Vergleich newreply.php - 1.6.14 - 1.6.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 288Zeile 288
	}
}


	}
}


if($mybb->input['action'] == "do_newreply" && $mybb->request_method == "post")


// If this isn't a logged in user, then we need to do some special validation.
if($mybb->user['uid'] == 0)

{

{

	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

$plugins->run_hooks("newreply_do_newreply_start");

// If this isn't a logged in user, then we need to do some special validation.
if($mybb->user['uid'] == 0)

	$username = htmlspecialchars_uni($mybb->input['username']);

// Check if username exists.
if(username_exists($mybb->input['username']))




	{

	{

		$username = htmlspecialchars_uni($mybb->input['username']);

// Check if username exists.
if(username_exists($mybb->input['username']))





		// If it does throw back "username is taken"
error($lang->error_usernametaken);
}
// This username does not exist.
else
{
// If they didn't specify a username then give them "Guest"
if(!$mybb->input['username'])

		{

		{

			// If it does throw back "username is taken"
error($lang->error_usernametaken);

			$username = $lang->guest;


		}

		}

		// This username does not exist.

		// Otherwise use the name they specified.

		else
{

		else
{

			// If they didn't specify a username then give them "Guest"
if(!$mybb->input['username'])
{
$username = $lang->guest;
}
// Otherwise use the name they specified.
else
{
$username = htmlspecialchars_uni($mybb->input['username']);
}
$uid = 0;

			$username = htmlspecialchars_uni($mybb->input['username']);











		}

		}

 
		$uid = 0;

	}

	}

	// This user is logged in.
else
{
$username = $mybb->user['username'];
$uid = $mybb->user['uid'];
}









}
// This user is logged in.
else
{
$username = $mybb->user['username'];
$uid = $mybb->user['uid'];
}

if($mybb->input['action'] == "do_newreply" && $mybb->request_method == "post")
{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

$plugins->run_hooks("newreply_do_newreply_start");


// Attempt to see if this post is a duplicate or not
if($uid > 0)


// Attempt to see if this post is a duplicate or not
if($uid > 0)

Zeile 528Zeile 528
					}
// Still have an array - set the new cookie
if(is_array($multiquote))

					}
// Still have an array - set the new cookie
if(is_array($multiquote))

					{

					{

						$new_multiquote = implode(",", $multiquote);
my_setcookie("multiquote", $new_multiquote);
}

						$new_multiquote = implode(",", $multiquote);
my_setcookie("multiquote", $new_multiquote);
}

Zeile 557Zeile 557
				else
{
$postcounter = $thread['replies'] + 1;

				else
{
$postcounter = $thread['replies'] + 1;

				}

				}


// Was there a new post since we hit the quick reply button?
if($mybb->input['lastpid'])


// Was there a new post since we hit the quick reply button?
if($mybb->input['lastpid'])

Zeile 568Zeile 568
					{
redirect(get_thread_link($tid, 0, "lastpost"));
}

					{
redirect(get_thread_link($tid, 0, "lastpost"));
}

 
				}

if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
{
$mybb->settings['postsperpage'] = 20;

				}

// Lets see if this post is on the same page as the one we're viewing or not

				}

// Lets see if this post is on the same page as the one we're viewing or not

Zeile 575Zeile 580
				if($perpage > 0 && (($postcounter) % $perpage) == 0)
{
$post_page = ($postcounter) / $mybb->settings['postsperpage'];

				if($perpage > 0 && (($postcounter) % $perpage) == 0)
{
$post_page = ($postcounter) / $mybb->settings['postsperpage'];

				}

				}

				else
{
$post_page = intval(($postcounter) / $mybb->settings['postsperpage']) + 1;

				else
{
$post_page = intval(($postcounter) / $mybb->settings['postsperpage']) + 1;

Zeile 603Zeile 608
				while($attachment = $db->fetch_array($query))
{
$attachcache[$attachment['pid']][$attachment['aid']] = $attachment;

				while($attachment = $db->fetch_array($query))
{
$attachcache[$attachment['pid']][$attachment['aid']] = $attachment;

				}

				}


// Establish altbg - may seem like this is backwards, but build_postbit reverses it
if(($postcounter - $mybb->settings['postsperpage']) % 2 != 0)


// Establish altbg - may seem like this is backwards, but build_postbit reverses it
if(($postcounter - $mybb->settings['postsperpage']) % 2 != 0)

Zeile 903Zeile 908
		// Now let the post handler do all the hard work.
$valid_post = $posthandler->verify_message();
$valid_subject = $posthandler->verify_subject();

		// Now let the post handler do all the hard work.
$valid_post = $posthandler->verify_message();
$valid_subject = $posthandler->verify_subject();

 
		
// guest post --> verify author
if($post['uid'] == 0)
{
$valid_username = $posthandler->verify_author();
}
else
{
$valid_username = true;
}


$post_errors = array();
// Fetch friendly error messages if this is an invalid post


$post_errors = array();
// Fetch friendly error messages if this is an invalid post

		if(!$valid_post || !$valid_subject)

		if(!$valid_post || !$valid_subject || !$valid_username)

		{
$post_errors = $posthandler->get_friendly_errors();
}

		{
$post_errors = $posthandler->get_friendly_errors();
}

Zeile 1117Zeile 1132

if($mybb->settings['threadreview'] != 0)
{


if($mybb->settings['threadreview'] != 0)
{

		if(!$mybb->settings['postsperpage'])

		if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)

		{

		{

			$mybb->settings['postperpage'] = 20;

			$mybb->settings['postsperpage'] = 20;

		}

if(is_moderator($fid))

		}

if(is_moderator($fid))