Vergleich newreply.php - 1.8.4 - 1.8.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 310Zeile 310
	// If this isn't a logged in user, then we need to do some special validation.
if($mybb->user['uid'] == 0)
{

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

		// Check if username exists.
if(username_exists($mybb->get_input('username')))

		// If they didn't specify a username then give them "Guest"
if(!$mybb->get_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->get_input('username'))
{
$username = $lang->guest;
}
// Otherwise use the name they specified.
else
{
$username = htmlspecialchars_uni($mybb->get_input('username'));
}
$uid = 0;

			$username = $mybb->get_input('username');











		}

		}

 
		$uid = 0;



if($mybb->settings['stopforumspam_on_newreply'])
{


if($mybb->settings['stopforumspam_on_newreply'])
{

Zeile 381Zeile 372
		$user_check = "p.ipaddress=".$db->escape_binary($session->packedip);
}
if(!$mybb->get_input('savedraft'))

		$user_check = "p.ipaddress=".$db->escape_binary($session->packedip);
}
if(!$mybb->get_input('savedraft'))

	{

	{

		$query = $db->simple_select("posts p", "p.pid, p.visible", "{$user_check} AND p.tid='{$thread['tid']}' AND p.subject='".$db->escape_string($mybb->get_input('subject'))."' AND p.message='".$db->escape_string($mybb->get_input('message'))."' AND p.visible != '-2' AND p.dateline>".(TIME_NOW-600));
$duplicate_check = $db->fetch_field($query, "pid");
if($duplicate_check)

		$query = $db->simple_select("posts p", "p.pid, p.visible", "{$user_check} AND p.tid='{$thread['tid']}' AND p.subject='".$db->escape_string($mybb->get_input('subject'))."' AND p.message='".$db->escape_string($mybb->get_input('message'))."' AND p.visible != '-2' AND p.dateline>".(TIME_NOW-600));
$duplicate_check = $db->fetch_field($query, "pid");
if($duplicate_check)

Zeile 411Zeile 402
	if(isset($mybb->input['pid']))
{
$post['pid'] = $mybb->get_input('pid', MyBB::INPUT_INT);

	if(isset($mybb->input['pid']))
{
$post['pid'] = $mybb->get_input('pid', MyBB::INPUT_INT);

	}


	}


	// Are we saving a draft post?
if($mybb->get_input('savedraft') && $mybb->user['uid'])
{

	// Are we saving a draft post?
if($mybb->get_input('savedraft') && $mybb->user['uid'])
{

Zeile 433Zeile 424
		$postoptions['subscriptionmethod'] = 0;
}
if(!isset($postoptions['disablesmilies']))

		$postoptions['subscriptionmethod'] = 0;
}
if(!isset($postoptions['disablesmilies']))

	{

	{

		$postoptions['disablesmilies'] = 0;
}

		$postoptions['disablesmilies'] = 0;
}





	// Set up the post options from the input.
$post['options'] = array(
"signature" => $postoptions['signature'],
"subscriptionmethod" => $postoptions['subscriptionmethod'],
"disablesmilies" => $postoptions['disablesmilies']
);

	// Set up the post options from the input.
$post['options'] = array(
"signature" => $postoptions['signature'],
"subscriptionmethod" => $postoptions['subscriptionmethod'],
"disablesmilies" => $postoptions['disablesmilies']
);





	// Apply moderation options if we have them
$post['modoptions'] = $mybb->get_input('modoptions', MyBB::INPUT_ARRAY);


	// Apply moderation options if we have them
$post['modoptions'] = $mybb->get_input('modoptions', MyBB::INPUT_ARRAY);


Zeile 494Zeile 485
					"imagestring" => $randomstr,
"dateline" => TIME_NOW
);

					"imagestring" => $randomstr,
"dateline" => TIME_NOW
);





				$db->insert_query("captcha", $imagearray);

//header("Content-type: text/html; charset={$lang->settings['charset']}");

				$db->insert_query("captcha", $imagearray);

//header("Content-type: text/html; charset={$lang->settings['charset']}");

Zeile 524Zeile 515

// One or more errors returned, fetch error list and throw to newreply page
if(count($post_errors) > 0)


// One or more errors returned, fetch error list and throw to newreply page
if(count($post_errors) > 0)

	{

	{

		$reply_errors = inline_error($post_errors, '', $json_data);
$mybb->input['action'] = "newreply";
}

		$reply_errors = inline_error($post_errors, '', $json_data);
$mybb->input['action'] = "newreply";
}

Zeile 534Zeile 525
		$pid = $postinfo['pid'];
$visible = $postinfo['visible'];
$closed = $postinfo['closed'];

		$pid = $postinfo['pid'];
$visible = $postinfo['visible'];
$closed = $postinfo['closed'];





		// Invalidate solved captcha
if($mybb->settings['captchaimage'] && !$mybb->user['uid'])
{

		// Invalidate solved captcha
if($mybb->settings['captchaimage'] && !$mybb->user['uid'])
{

Zeile 575Zeile 566
				my_unsetcookie("multiquote");
}
// Only quoted a few - attempt to remove them from the cookie

				my_unsetcookie("multiquote");
}
// Only quoted a few - attempt to remove them from the cookie

			else
{

			else
{

				$quoted_ids = explode("|", $mybb->get_input('quoted_ids'));
$multiquote = explode("|", $mybb->cookies['multiquote']);
if(is_array($multiquote) && is_array($quoted_ids))

				$quoted_ids = explode("|", $mybb->get_input('quoted_ids'));
$multiquote = explode("|", $mybb->cookies['multiquote']);
if(is_array($multiquote) && is_array($quoted_ids))

Zeile 903Zeile 894
		$message = htmlspecialchars_uni($post['message']);
$subject = $post['subject'];
if($post['includesig'] != 0)

		$message = htmlspecialchars_uni($post['message']);
$subject = $post['subject'];
if($post['includesig'] != 0)

		{
$postoptionschecked['signature'] = " checked=\"checked\"";

		{
$postoptionschecked['signature'] = " checked=\"checked\"";

		}
if($post['smilieoff'] == 1)

		}
if($post['smilieoff'] == 1)

		{

		{

			$postoptionschecked['disablesmilies'] = " checked=\"checked\"";

			$postoptionschecked['disablesmilies'] = " checked=\"checked\"";

		}

		}

		if(isset($postoptions['subscriptionmethod']) && $postoptions['subscriptionmethod'] == "none")
{
$postoptions_subscriptionmethod_none = "checked=\"checked\"";
}
else if(isset($postoptions['subscriptionmethod']) && $postoptions['subscriptionmethod'] == "email")

		if(isset($postoptions['subscriptionmethod']) && $postoptions['subscriptionmethod'] == "none")
{
$postoptions_subscriptionmethod_none = "checked=\"checked\"";
}
else if(isset($postoptions['subscriptionmethod']) && $postoptions['subscriptionmethod'] == "email")

		{

		{

			$postoptions_subscriptionmethod_email = "checked=\"checked\"";

			$postoptions_subscriptionmethod_email = "checked=\"checked\"";

		}

		}

		else if(isset($postoptions['subscriptionmethod']) && $postoptions['subscriptionmethod'] == "pm")

		else if(isset($postoptions['subscriptionmethod']) && $postoptions['subscriptionmethod'] == "pm")

		{
$postoptions_subscriptionmethod_pm = "checked=\"checked\"";
}
else
{
$postoptions_subscriptionmethod_dont = "checked=\"checked\"";
}

		{
$postoptions_subscriptionmethod_pm = "checked=\"checked\"";
}
else
{
$postoptions_subscriptionmethod_dont = "checked=\"checked\"";
}

		$mybb->input['icon'] = $post['icon'];
}
else

		$mybb->input['icon'] = $post['icon'];
}
else

Zeile 933Zeile 924
		if($mybb->user['signature'] != '')
{
$postoptionschecked['signature'] = " checked=\"checked\"";

		if($mybb->user['signature'] != '')
{
$postoptionschecked['signature'] = " checked=\"checked\"";

		}
if($mybb->user['subscriptionmethod'] == 1)
{
$postoptions_subscriptionmethod_none = "checked=\"checked\"";

		}
if($mybb->user['subscriptionmethod'] == 1)
{
$postoptions_subscriptionmethod_none = "checked=\"checked\"";

		}
else if($mybb->user['subscriptionmethod'] == 2)

		}
else if($mybb->user['subscriptionmethod'] == 2)

		{

		{

			$postoptions_subscriptionmethod_email = "checked=\"checked\"";
}
else if($mybb->user['subscriptionmethod'] == 3)
{
$postoptions_subscriptionmethod_pm = "checked=\"checked\"";

			$postoptions_subscriptionmethod_email = "checked=\"checked\"";
}
else if($mybb->user['subscriptionmethod'] == 3)
{
$postoptions_subscriptionmethod_pm = "checked=\"checked\"";

		}

		}

		else
{
$postoptions_subscriptionmethod_dont = "checked=\"checked\"";
}

		else
{
$postoptions_subscriptionmethod_dont = "checked=\"checked\"";
}

	}


	}


	if($forum['allowpicons'] != 0)
{
$posticons = get_post_icons();

	if($forum['allowpicons'] != 0)
{
$posticons = get_post_icons();

	}


	}


	// No subject?
if(!isset($subject))
{

	// No subject?
if(!isset($subject))
{

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

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

			// Check if username exists.
if(username_exists($mybb->get_input('username')))
{
// If it does throw back "username is taken"
error($lang->error_usernametaken);
}
// This username does not exist.

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


			else
{

			else
{

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

				$username = $mybb->get_input('username');











			}

			}

 
			$uid = 0;

		}
// This user is logged in.
else

		}
// This user is logged in.
else

Zeile 1252Zeile 1233
			{
$post_captcha->build_captcha();
}

			{
$post_captcha->build_captcha();
}

			elseif($post_captcha->type == 2)

			elseif($post_captcha->type == 2 || $post_captcha->type == 4)

			{
$post_captcha->build_recaptcha();
}

			{
$post_captcha->build_recaptcha();
}

Zeile 1266Zeile 1247
				$captcha = $post_captcha->html;
}
}

				$captcha = $post_captcha->html;
}
}

		else if($correct && $post_captcha->type == 2)

		else if($correct && ($post_captcha->type == 2 || $post_captcha->type == 4))

		{
$post_captcha->build_recaptcha();


		{
$post_captcha->build_recaptcha();