Vergleich newthread.php - 1.2.11 - 1.2.14

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

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*

 * $Id: newthread.php 3478 2007-11-15 04:11:36Z Tikitiki $

 * $Id: newthread.php 4005 2008-07-10 17:53:25Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 143Zeile 143
}

// Are we removing an attachment from the thread?

}

// Are we removing an attachment from the thread?

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

if($mybb->input['attachmentaid'] && $mybb->input['posthash'])

{
require_once MYBB_ROOT."inc/functions_upload.php";
remove_attachment(0, $mybb->input['posthash'], $mybb->input['attachmentaid']);

{
require_once MYBB_ROOT."inc/functions_upload.php";
remove_attachment(0, $mybb->input['posthash'], $mybb->input['attachmentaid']);

Zeile 172Zeile 172
// Performing the posting of a new thread.
if($mybb->input['action'] == "do_newthread" && $mybb->request_method == "post")
{

// Performing the posting of a new thread.
if($mybb->input['action'] == "do_newthread" && $mybb->request_method == "post")
{

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


	$plugins->run_hooks("newthread_do_newthread_start");

// If this isn't a logged in user, then we need to do some special validation.

	$plugins->run_hooks("newthread_do_newthread_start");

// If this isn't a logged in user, then we need to do some special validation.

Zeile 191Zeile 194
			//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();

			//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'])

			// 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'])

Zeile 254Zeile 257
		$user_check = "p.ipaddress='".$db->escape_string($session->ipaddress)."'";
}
if(!$mybb->input['savedraft'] && !$pid)

		$user_check = "p.ipaddress='".$db->escape_string($session->ipaddress)."'";
}
if(!$mybb->input['savedraft'] && !$pid)

	{

	{

		$query = $db->simple_select(TABLE_PREFIX."posts p", "p.pid", "$user_check AND p.fid='{$forum['fid']}' AND p.subject='".$db->escape_string($mybb->input['subject'])."' AND p.message='".$db->escape_string($mybb->input['message'])."' AND p.posthash='".$db->escape_string($mybb->input['posthash'])."'");
$duplicate_check = $db->fetch_field($query, "pid");
if($duplicate_check)

		$query = $db->simple_select(TABLE_PREFIX."posts p", "p.pid", "$user_check AND p.fid='{$forum['fid']}' AND p.subject='".$db->escape_string($mybb->input['subject'])."' AND p.message='".$db->escape_string($mybb->input['message'])."' AND p.posthash='".$db->escape_string($mybb->input['posthash'])."'");
$duplicate_check = $db->fetch_field($query, "pid");
if($duplicate_check)

Zeile 321Zeile 324
	if(!$valid_thread)
{
$post_errors = $posthandler->get_friendly_errors();

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

	}


	}	


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

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

Zeile 334Zeile 336
		if(strtolower($imgcheck['imagestring']) != strtolower($imagestring) || !$imgcheck['imagehash'])
{
$post_errors[] = $lang->invalid_captcha;

		if(strtolower($imgcheck['imagestring']) != strtolower($imagestring) || !$imgcheck['imagehash'])
{
$post_errors[] = $lang->invalid_captcha;

		}

		}

		else
{
$db->delete_query(TABLE_PREFIX."captcha", "imagehash='$imagehash'");
$hide_captcha = true;
}
}

		else
{
$db->delete_query(TABLE_PREFIX."captcha", "imagehash='$imagehash'");
$hide_captcha = true;
}
}



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

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