Vergleich newreply.php - 1.6.7 - 1.6.9

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: newreply.php 5746 2012-02-03 10:03:25Z Tomm $

 * $Id$

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

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

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

			// If it does and no password is given throw back "username is taken"
if(!$mybb->input['password'])
{
error($lang->error_usernametaken);
}

// Checks to make sure the user can login; they haven't had too many tries at logging in.
// Is a fatal call if user has had too many tries
$logins = login_attempt_check();

// If the user specified a password but it is wrong, throw back invalid password.
$mybb->user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);
if(!$mybb->user['uid'])
{
my_setcookie('loginattempts', $logins + 1);
$db->update_query("users", array('loginattempts' => 'loginattempts+1'), "LOWER(username) = '".$db->escape_string(my_strtolower($mybb->input['username']))."'", 1, true);
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.

$mybb->input['username'] = $username = $mybb->user['username'];
my_setcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey'], null, true);
my_setcookie('loginattempts', 1);

// Update the session to contain their user ID
$updated_session = array(
"uid" => $mybb->user['uid'],
);
$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'];
$username = $mybb->user['username'];

// Check if this user is allowed to post here
$mybb->usergroup = &$groupscache[$mybb->user['usergroup']];
$forumpermissions = forum_permissions($fid);
if($forumpermissions['canview'] == 0 || $forumpermissions['canpostreplys'] == 0 || $mybb->user['suspendposting'] == 1)
{
error_no_permission();
}

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














































		}
// This username does not exist.
else

		}
// This username does not exist.
else

Zeile 350Zeile 305
		}
}
// This user is logged in.

		}
}
// This user is logged in.

	else

	else

	{
$username = $mybb->user['username'];
$uid = $mybb->user['uid'];

	{
$username = $mybb->user['username'];
$uid = $mybb->user['uid'];

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

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

	}
else
{

	}
else
{

		$post['savedraft'] = 0;
}


		$post['savedraft'] = 0;
}


Zeile 414Zeile 369
		"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 441Zeile 396
		$post_captcha = new captcha(false, "post_captcha");

if($post_captcha->validate_captcha() == false)

		$post_captcha = new captcha(false, "post_captcha");

if($post_captcha->validate_captcha() == false)

		{

		{

			// CAPTCHA validation failed
foreach($post_captcha->get_errors() as $error)
{

			// CAPTCHA validation failed
foreach($post_captcha->get_errors() as $error)
{

Zeile 459Zeile 414
			{
$randomstr = random_str(5);
$imagehash = md5(random_str(12));

			{
$randomstr = random_str(5);
$imagehash = md5(random_str(12));





				$imagearray = array(
"imagehash" => $imagehash,
"imagestring" => $randomstr,

				$imagearray = array(
"imagehash" => $imagehash,
"imagestring" => $randomstr,

Zeile 477Zeile 432
				}

echo "</captcha>";

				}

echo "</captcha>";

			}

			}

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

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

Zeile 769Zeile 724
	}

if($mybb->input['quoted_ids'])

	}

if($mybb->input['quoted_ids'])

	{

	{

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

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

	}

	}


if($mybb->input['previewpost'])
{
$previewmessage = $mybb->input['message'];


if($mybb->input['previewpost'])
{
$previewmessage = $mybb->input['message'];

	}

	}

	if(!$message)
{
$message = $mybb->input['message'];

	if(!$message)
{
$message = $mybb->input['message'];

Zeile 788Zeile 743
	{
$postoptions = $mybb->input['postoptions'];
if($postoptions['signature'] == 1)

	{
$postoptions = $mybb->input['postoptions'];
if($postoptions['signature'] == 1)

		{
$postoptionschecked['signature'] = " checked=\"checked\"";
}
if($postoptions['subscriptionmethod'] == "none")
{
$postoptions_subscriptionmethod_none = "checked=\"checked\"";
}
else if($postoptions['subscriptionmethod'] == "instant")
{
$postoptions_subscriptionmethod_instant = "checked=\"checked\"";
}

		{
$postoptionschecked['signature'] = " checked=\"checked\"";
}
if($postoptions['subscriptionmethod'] == "none")
{
$postoptions_subscriptionmethod_none = "checked=\"checked\"";
}
else if($postoptions['subscriptionmethod'] == "instant")
{
$postoptions_subscriptionmethod_instant = "checked=\"checked\"";
}

		else
{
$postoptions_subscriptionmethod_dont = "checked=\"checked\"";
}
if($postoptions['disablesmilies'] == 1)

		else
{
$postoptions_subscriptionmethod_dont = "checked=\"checked\"";
}
if($postoptions['disablesmilies'] == 1)

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

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

		}
$subject = $mybb->input['subject'];
}

		}
$subject = $mybb->input['subject'];
}

Zeile 820Zeile 775
		if($post['smilieoff'] == 1)
{
$postoptionschecked['disablesmilies'] = " checked=\"checked\"";

		if($post['smilieoff'] == 1)
{
$postoptionschecked['disablesmilies'] = " checked=\"checked\"";

 
		}
if($postoptions['subscriptionmethod'] == "none")
{
$postoptions_subscriptionmethod_none = "checked=\"checked\"";
}
else if($postoptions['subscriptionmethod'] == "instant")
{
$postoptions_subscriptionmethod_instant = "checked=\"checked\"";
}
else
{
$postoptions_subscriptionmethod_dont = "checked=\"checked\"";

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

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

Zeile 828Zeile 795
		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_instant = "checked=\"checked\"";
}
else
{
$postoptions_subscriptionmethod_dont = "checked=\"checked\"";

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

		}

		}

	}

if($forum['allowpicons'] != 0)

	}

if($forum['allowpicons'] != 0)

Zeile 876Zeile 843
		);

if($mybb->input['pid'])

		);

if($mybb->input['pid'])

		{

		{

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


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


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

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

			}
if($mybb->input['username'] && !$mybb->user['uid'])
{
$mybb->user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);

 
			}
$mybb->input['icon'] = intval($mybb->input['icon']);
$query = $db->query("

			}
$mybb->input['icon'] = intval($mybb->input['icon']);
$query = $db->query("