Vergleich newthread.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: newthread.php 5746 2012-02-03 10:03:25Z Tomm $

 * $Id$

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 216Zeile 216
		// 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['canpostthreads'] == 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 424Zeile 379
			// Moderated thread
$lang->redirect_newthread .= $lang->redirect_newthread_moderation;
$url = get_forum_link($fid);

			// Moderated thread
$lang->redirect_newthread .= $lang->redirect_newthread_moderation;
$url = get_forum_link($fid);

		}

		}


// This is just a normal thread - send them to it.
else


// This is just a normal thread - send them to it.
else

Zeile 580Zeile 535
			$postoptions_subscriptionmethod_dont = "checked=\"checked\"";
}
if($postoptions['disablesmilies'] == 1)

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

		{
$postoptionschecked['disablesmilies'] = " checked=\"checked\"";
}
if($mybb->input['postpoll'] == 1)
{
$postpollchecked = "checked=\"checked\"";
}

		{
$postoptionschecked['disablesmilies'] = " checked=\"checked\"";
}
if($mybb->input['postpoll'] == 1)
{
$postpollchecked = "checked=\"checked\"";
}

		$numpolloptions = intval($mybb->input['numpolloptions']);
}


		$numpolloptions = intval($mybb->input['numpolloptions']);
}


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

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

		{

		{

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

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

		{

		{

			$postoptionschecked['disablesmilies'] = " checked=\"checked\"";
}
$icon = $post['icon'];
if($forum['allowpicons'] != 0)
{
$posticons = get_post_icons();

			$postoptionschecked['disablesmilies'] = " checked=\"checked\"";
}
$icon = $post['icon'];
if($forum['allowpicons'] != 0)
{
$posticons = get_post_icons();

 
		}
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\"";

		}
}


		}
}


Zeile 681Zeile 648
			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']);

 
			}
$query = $db->query("
SELECT u.*, f.*

			}
$query = $db->query("
SELECT u.*, f.*