Vergleich newthread.php - 1.2.8 - 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 3055 2007-05-13 15:01:15Z Tikitiki $

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

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 66Zeile 66
{
error_no_permission();
}

{
error_no_permission();
}

// Check if this forum is password protected and if we've got the right password to access it.
check_forum_password($fid, $forum['password']);



// Check if this forum is password protected and we have a valid password
check_forum_password($forum['fid']);


// If MyCode is on for this forum and the MyCode editor is enabled inthe Admin CP, draw the code buttons and smilie inserter.
if($mybb->settings['bbcodeinserter'] != "off" && $forum['allowmycode'] != "no" && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))


// If MyCode is on for this forum and the MyCode editor is enabled inthe Admin CP, draw the code buttons and smilie inserter.
if($mybb->settings['bbcodeinserter'] != "off" && $forum['allowmycode'] != "no" && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))

Zeile 76Zeile 77
	if($forum['allowsmilies'] != "no")
{
$smilieinserter = build_clickable_smilies();

	if($forum['allowsmilies'] != "no")
{
$smilieinserter = build_clickable_smilies();

	}

	}

}

// Does this forum allow post icons? If so, fetch the post icons.
if($forum['allowpicons'] != "no")
{
$posticons = get_post_icons();

}

// Does this forum allow post icons? If so, fetch the post icons.
if($forum['allowpicons'] != "no")
{
$posticons = get_post_icons();

}


}


// If we have a currently logged in user then fetch the change user box.
if($mybb->user['uid'] != 0)
{

// If we have a currently logged in user then fetch the change user box.
if($mybb->user['uid'] != 0)
{

Zeile 101Zeile 102
	else
{
$username = htmlspecialchars($mybb->input['username']);

	else
{
$username = htmlspecialchars($mybb->input['username']);

	}

	}

	eval("\$loginbox = \"".$templates->get("loginbox")."\";");
}

// If we're not performing a new thread insert and not editing a draft then we're posting a new thread.
if($mybb->input['action'] != "do_newthread" && $mybb->input['action'] != "editdraft")

	eval("\$loginbox = \"".$templates->get("loginbox")."\";");
}

// If we're not performing a new thread insert and not editing a draft then we're posting a new thread.
if($mybb->input['action'] != "do_newthread" && $mybb->input['action'] != "editdraft")

{
$mybb->input['action'] = "newthread";
}

{
$mybb->input['action'] = "newthread";
}


// Previewing a post, overwrite the action to the new thread action.
if($mybb->input['previewpost'])


// Previewing a post, overwrite the action to the new thread action.
if($mybb->input['previewpost'])

{

{

	$mybb->input['action'] = "newthread";
}


	$mybb->input['action'] = "newthread";
}


Zeile 122Zeile 123
{
// If there's an attachment, check it and upload it
if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != "no")

{
// If there's an attachment, check it and upload it
if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != "no")

	{

	{

		require_once MYBB_ROOT."inc/functions_upload.php";
$attachedfile = upload_attachment($_FILES['attachment']);

		require_once MYBB_ROOT."inc/functions_upload.php";
$attachedfile = upload_attachment($_FILES['attachment']);

	}


	}


	// Error with attachments - should use new inline errors?
if($attachedfile['error'])
{

	// Error with attachments - should use new inline errors?
if($attachedfile['error'])
{

Zeile 135Zeile 136
	}

// If we were dealing with an attachment but didn't click 'Post Thread', force the new thread page again.

	}

// If we were dealing with an attachment but didn't click 'Post Thread', force the new thread page again.

	if(!$mybb->input['submit'])

	if(!$mybb->input['submit'])

	{
$mybb->input['action'] = "newthread";
}
}

// Are we removing an attachment from the thread?

	{
$mybb->input['action'] = "newthread";
}
}

// 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 171Zeile 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 202Zeile 206
					$login_text = sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);
}
error($lang->error_invalidpassword.$login_text);

					$login_text = 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'];

			// Otherwise they've logged in successfully.

$mybb->input['username'] = $username = $mybb->user['username'];

Zeile 320Zeile 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 333Zeile 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)