Vergleich newthread.php - 1.6.13 - 1.6.15

  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.

}

// Performing the posting of a new thread.

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

$plugins->run_hooks("newthread_do_newthread_start");

	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.
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)


// Attempt to see if this post is a duplicate or not
if($uid > 0)

Zeile 387Zeile 387
		{
$url = "polls.php?action=newpoll&tid=$tid&polloptions=".intval($mybb->input['numpolloptions']);
$lang->redirect_newthread .= $lang->redirect_newthread_poll;

		{
$url = "polls.php?action=newpoll&tid=$tid&polloptions=".intval($mybb->input['numpolloptions']);
$lang->redirect_newthread .= $lang->redirect_newthread_poll;

		}

		}


// This thread is stuck in the moderation queue, send them back to the forum.
else if(!$visible)


// This thread is stuck in the moderation queue, send them back to the forum.
else if(!$visible)

Zeile 413Zeile 413

// Mark any quoted posts so they're no longer selected - attempts to maintain those which weren't selected
if($mybb->input['quoted_ids'] && $mybb->cookies['multiquote'] && $mybb->settings['multiquote'] != 0)


// Mark any quoted posts so they're no longer selected - attempts to maintain those which weren't selected
if($mybb->input['quoted_ids'] && $mybb->cookies['multiquote'] && $mybb->settings['multiquote'] != 0)

		{

		{

			// We quoted all posts - remove the entire cookie
if($mybb->input['quoted_ids'] == "all")
{
my_unsetcookie("multiquote");
}

			// We quoted all posts - remove the entire cookie
if($mybb->input['quoted_ids'] == "all")
{
my_unsetcookie("multiquote");
}

		}


		}


		$plugins->run_hooks("newthread_do_newthread_end");

// Hop to it! Send them to the next page.

		$plugins->run_hooks("newthread_do_newthread_end");

// Hop to it! Send them to the next page.

Zeile 440Zeile 440
	if(count($errors) > 0)
{
$thread_errors = inline_error($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 547Zeile 547
		$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\"";
}
else
{
$postoptions_subscriptionmethod_dont = "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)
{

		}
if($postoptions['disablesmilies'] == 1)
{

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

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

		{

		{

			$postoptionschecked['disablesmilies'] = " checked=\"checked\"";
}
$icon = $post['icon'];

			$postoptionschecked['disablesmilies'] = " checked=\"checked\"";
}
$icon = $post['icon'];

Zeile 596Zeile 596
			$postoptions_subscriptionmethod_none = "checked=\"checked\"";
}
else if($postoptions['subscriptionmethod'] == "instant")

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

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

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


// Otherwise, this is our initial visit to this page.
else


// Otherwise, this is our initial visit to this page.
else

Zeile 617Zeile 617
			$postoptions_subscriptionmethod_none = "checked=\"checked\"";
}
else if($mybb->user['subscriptionmethod'] == 2)

			$postoptions_subscriptionmethod_none = "checked=\"checked\"";
}
else if($mybb->user['subscriptionmethod'] == 2)

		{

		{

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

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

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

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

		}


		}


		$posthandler->set_data($new_thread);

		$posthandler->set_data($new_thread);





		// 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 844Zeile 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")."\";");