Vergleich newthread.php - 1.6.12 - 1.6.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 14Zeile 14

$templatelist = "newthread,previewpost,loginbox,changeuserbox,newthread_postpoll,posticons,codebuttons,smilieinsert,newthread_multiquote_external,post_attachments_attachment_unapproved";
$templatelist .= ",newthread_disablesmilies,newreply_modoptions,post_attachments_new,post_attachments,post_savedraftbutton,post_subscription_method,post_attachments_attachment_remove";


$templatelist = "newthread,previewpost,loginbox,changeuserbox,newthread_postpoll,posticons,codebuttons,smilieinsert,newthread_multiquote_external,post_attachments_attachment_unapproved";
$templatelist .= ",newthread_disablesmilies,newreply_modoptions,post_attachments_new,post_attachments,post_savedraftbutton,post_subscription_method,post_attachments_attachment_remove";

$templatelist .= ",forumdisplay_rules,forumdisplay_rules_link,post_attachments_attachment_postinsert,post_attachments_attachment,newthread_options_signature";

$templatelist .= ",forumdisplay_rules,forumdisplay_rules_link,post_attachments_attachment_postinsert,post_attachments_attachment,post_attachments_add,newthread_options_signature";

$templatelist .= ",member_register_regimage,member_register_regimage_recaptcha,post_captcha_hidden,post_captcha,post_captcha_recaptcha,postbit_groupimage,postbit_online,postbit_away,postbit_offline";
$templatelist .= ",postbit_avatar,postbit_find,postbit_pm,postbit_rep_button,postbit_www,postbit_email,postbit_reputation,postbit_warn,postbit_warninglevel,postbit_author_user,postbit_author_guest";
$templatelist .= ",postbit_signature,postbit_classic,postbit,postbit_attachments_thumbnails_thumbnail,postbit_attachments_images_image,postbit_attachments_attachment,postbit_attachments_attachment_unapproved";

$templatelist .= ",member_register_regimage,member_register_regimage_recaptcha,post_captcha_hidden,post_captcha,post_captcha_recaptcha,postbit_groupimage,postbit_online,postbit_away,postbit_offline";
$templatelist .= ",postbit_avatar,postbit_find,postbit_pm,postbit_rep_button,postbit_www,postbit_email,postbit_reputation,postbit_warn,postbit_warninglevel,postbit_author_user,postbit_author_guest";
$templatelist .= ",postbit_signature,postbit_classic,postbit,postbit_attachments_thumbnails_thumbnail,postbit_attachments_images_image,postbit_attachments_attachment,postbit_attachments_attachment_unapproved";

Zeile 208Zeile 208
		$lang->error_maxposts = $lang->sprintf($lang->error_maxposts, $mybb->settings['maxposts']);
error($lang->error_maxposts);
}

		$lang->error_maxposts = $lang->sprintf($lang->error_maxposts, $mybb->settings['maxposts']);
error($lang->error_maxposts);
}

 
}

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

// Check if username exists.
if(username_exists($mybb->input['username']))
{
// If it does throw back "username is taken"
error($lang->error_usernametaken);
}
// This username does not exist.
else
{
// If they didn't specify a username then give them "Guest"
if(!$mybb->input['username'])
{
$username = $lang->guest;
}
// Otherwise use the name they specified.
else
{
$username = htmlspecialchars_uni($mybb->input['username']);
}
$uid = 0;
}
}
// This user is logged in.
else
{
$username = $mybb->user['username'];
$uid = $mybb->user['uid'];

}

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

}

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


	verify_post_check($mybb->input['my_post_key']);


	$plugins->run_hooks("newthread_do_newthread_start");

	$plugins->run_hooks("newthread_do_newthread_start");


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

// Check if username exists.
if(username_exists($mybb->input['username']))
{
// If it does throw back "username is taken"
error($lang->error_usernametaken);
}
// This username does not exist.
else
{
// If they didn't specify a username then give them "Guest"
if(!$mybb->input['username'])
{
$username = $lang->guest;
}
// Otherwise use the name they specified.
else
{
$username = htmlspecialchars_uni($mybb->input['username']);
}
$uid = 0;
}
}
// This user is logged in.
else
{
$username = $mybb->user['username'];
$uid = $mybb->user['uid'];
}

 

// Attempt to see if this post is a duplicate or not
if($uid > 0)
{
$user_check = "p.uid='{$uid}'";


// Attempt to see if this post is a duplicate or not
if($uid > 0)
{
$user_check = "p.uid='{$uid}'";

	}

	}

	else
{
$user_check = "p.ipaddress='".$db->escape_string($session->ipaddress)."'";

	else
{
$user_check = "p.ipaddress='".$db->escape_string($session->ipaddress)."'";

Zeile 287Zeile 287
		"message" => $mybb->input['message'],
"ipaddress" => get_ip(),
"posthash" => $mybb->input['posthash']

		"message" => $mybb->input['message'],
"ipaddress" => get_ip(),
"posthash" => $mybb->input['posthash']

	);


	);


	if($pid != '')
{
$new_thread['pid'] = $pid;

	if($pid != '')
{
$new_thread['pid'] = $pid;

Zeile 302Zeile 302
	else
{
$new_thread['savedraft'] = 0;

	else
{
$new_thread['savedraft'] = 0;

	}

	}


// Is this thread already a draft and we're updating it?
if(isset($thread['tid']) && $thread['visible'] == -2)


// Is this thread already a draft and we're updating it?
if(isset($thread['tid']) && $thread['visible'] == -2)

Zeile 349Zeile 349
		else
{
$hide_captcha = true;

		else
{
$hide_captcha = true;

		}
}


		}
}


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

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

Zeile 434Zeile 434

if($mybb->input['action'] == "newthread" || $mybb->input['action'] == "editdraft")
{


if($mybb->input['action'] == "newthread" || $mybb->input['action'] == "editdraft")
{



 
	$plugins->run_hooks("newthread_start");

	$plugins->run_hooks("newthread_start");

 

// Do we have attachment errors?
if(count($errors) > 0)
{
$thread_errors = inline_error($errors);
}


// If this isn't a preview and we're not editing a draft, then handle quoted posts
if(!$mybb->input['previewpost'] && !$thread_errors && $mybb->input['action'] != "editdraft")


// If this isn't a preview and we're not editing a draft, then handle quoted posts
if(!$mybb->input['previewpost'] && !$thread_errors && $mybb->input['action'] != "editdraft")

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

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

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

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

		}
if($postoptions['subscriptionmethod'] == "none")
{

		}
if($postoptions['subscriptionmethod'] == "none")
{

Zeile 653Zeile 658
		// Now let the post handler do all the hard work.
$valid_thread = $posthandler->verify_message();
$valid_subject = $posthandler->verify_subject();

		// Now let the post handler do all the hard work.
$valid_thread = $posthandler->verify_message();
$valid_subject = $posthandler->verify_subject();

 

// guest post --> verify author
if($new_thread['uid'] == 0)
{
$valid_username = $posthandler->verify_author();
}
else
{
$valid_username = true;
}


$post_errors = array();
// Fetch friendly error messages if this is an invalid post


$post_errors = array();
// Fetch friendly error messages if this is an invalid post

		if(!$valid_thread || !$valid_subject)

		if(!$valid_thread || !$valid_subject || !$valid_username)

		{
$post_errors = $posthandler->get_friendly_errors();
}

		{
$post_errors = $posthandler->get_friendly_errors();
}

Zeile 728Zeile 743
	{
$message = htmlspecialchars_uni($mybb->input['message']);
$subject = htmlspecialchars_uni($mybb->input['subject']);

	{
$message = htmlspecialchars_uni($mybb->input['message']);
$subject = htmlspecialchars_uni($mybb->input['subject']);

	}

// Do we have attachment errors?
if(count($errors) > 0)
{
$thread_errors = inline_error($errors);

 
	}

// Generate thread prefix selector

	}

// Generate thread prefix selector

Zeile 845Zeile 854
		$lang->attach_quota = $lang->sprintf($lang->attach_quota, $friendlyusage, $friendlyquota);
if($mybb->settings['maxattachments'] == 0 || ($mybb->settings['maxattachments'] != 0 && $attachcount < $mybb->settings['maxattachments']) && !$noshowattach)
{

		$lang->attach_quota = $lang->sprintf($lang->attach_quota, $friendlyusage, $friendlyquota);
if($mybb->settings['maxattachments'] == 0 || ($mybb->settings['maxattachments'] != 0 && $attachcount < $mybb->settings['maxattachments']) && !$noshowattach)
{

 
			eval("\$attach_add_options = \"".$templates->get("post_attachments_add")."\";");

			eval("\$newattach = \"".$templates->get("post_attachments_new")."\";");
}
eval("\$attachbox = \"".$templates->get("post_attachments")."\";");

			eval("\$newattach = \"".$templates->get("post_attachments_new")."\";");
}
eval("\$attachbox = \"".$templates->get("post_attachments")."\";");