Vergleich newreply.php - 1.4.2 - 1.4.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: newreply.php 4188 2008-09-14 05:05:26Z Tikitiki $

 * $Id: newreply.php 4322 2009-02-21 23:00:49Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 132Zeile 132
{
if(!$mybb->input['previewpost'] && $mybb->input['action'] != "do_newreply")
{

{
if(!$mybb->input['previewpost'] && $mybb->input['action'] != "do_newreply")
{

		$username = $lang->guest;

		$username = '';

	}
elseif($mybb->input['previewpost'])
{

	}
elseif($mybb->input['previewpost'])
{

Zeile 263Zeile 263
			if(!$mybb->user['uid'])
{
my_setcookie('loginattempts', $logins + 1);

			if(!$mybb->user['uid'])
{
my_setcookie('loginattempts', $logins + 1);

				$db->write_query("UPDATE ".TABLE_PREFIX."sessions SET loginattempts=loginattempts+1 WHERE sid = '{$session->sid}'");

				$db->write_query("UPDATE ".TABLE_PREFIX."users SET loginattempts=loginattempts+1 WHERE username = '".$db->escape_string($mybb->input['username'])."'");

				if($mybb->settings['failedlogintext'] == 1)
{
$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);

				if($mybb->settings['failedlogintext'] == 1)
{
$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);

				}				

				}		

				error($lang->error_invalidpassword.$login_text);
}
// Otherwise they've logged in successfully.

				error($lang->error_invalidpassword.$login_text);
}
// Otherwise they've logged in successfully.

Zeile 279Zeile 279
			// Update the session to contain their user ID
$updated_session = array(
"uid" => $mybb->user['uid'],

			// Update the session to contain their user ID
$updated_session = array(
"uid" => $mybb->user['uid'],

				"loginattempts" => 0

 
			);
$db->update_query("sessions", $updated_session, "sid='{$session->sid}'");

			);
$db->update_query("sessions", $updated_session, "sid='{$session->sid}'");

 

$db->update_query("users", array("loginattempts" => 1), "uid='{$mybb->user['uid']}'");


// Set uid and username
$uid = $mybb->user['uid'];


// Set uid and username
$uid = $mybb->user['uid'];

Zeile 302Zeile 303
			if(!$mybb->input['username'])
{
$username = $lang->guest;

			if(!$mybb->input['username'])
{
$username = $lang->guest;

			}

			}

			// Otherwise use the name they specified.
else
{
$username = htmlspecialchars($mybb->input['username']);
}
$uid = 0;

			// Otherwise use the name they specified.
else
{
$username = htmlspecialchars($mybb->input['username']);
}
$uid = 0;

		}
}

		}
}

	// This user is logged in.
else
{

	// This user is logged in.
else
{

Zeile 364Zeile 365
	if($mybb->input['savedraft'] && $mybb->user['uid'])
{
$post['savedraft'] = 1;

	if($mybb->input['savedraft'] && $mybb->user['uid'])
{
$post['savedraft'] = 1;

	}

	}

	else
{
$post['savedraft'] = 0;

	else
{
$post['savedraft'] = 0;

Zeile 376Zeile 377
		"subscriptionmethod" => $mybb->input['postoptions']['subscriptionmethod'],
"disablesmilies" => $mybb->input['postoptions']['disablesmilies']
);

		"subscriptionmethod" => $mybb->input['postoptions']['subscriptionmethod'],
"disablesmilies" => $mybb->input['postoptions']['disablesmilies']
);





	// Apply moderation options if we have them
$post['modoptions'] = $mybb->input['modoptions'];


	// Apply moderation options if we have them
$post['modoptions'] = $mybb->input['modoptions'];


Zeile 390Zeile 391
	if(!$valid_post)
{
$post_errors = $posthandler->get_friendly_errors();

	if(!$valid_post)
{
$post_errors = $posthandler->get_friendly_errors();

	}







	}

// Mark thread as read
require_once MYBB_ROOT."inc/functions_indicators.php";
mark_thread_read($tid, $fid);



	// Check captcha image
if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && !$mybb->user['uid'])
{

	// Check captcha image
if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && !$mybb->user['uid'])
{

Zeile 458Zeile 464
		else
{
// Moderated post

		else
{
// Moderated post

			$lang->redirect_newreply .= $lang->redirect_newreply_moderation;

			$lang->redirect_newreply .= '<br />'.$lang->redirect_newreply_moderation;

			$url = get_thread_link($tid);
}


			$url = get_thread_link($tid);
}


Zeile 499Zeile 505
				}
}
}

				}
}
}


// Mark thread as read
require_once MYBB_ROOT."inc/functions_indicators.php";
mark_thread_read($tid, $fid);


		





		$plugins->run_hooks("newreply_do_newreply_end");

// This was a post made via the ajax quick reply - we need to do some special things here

		$plugins->run_hooks("newreply_do_newreply_end");

// This was a post made via the ajax quick reply - we need to do some special things here