Vergleich newthread.php - 1.6.10 - 1.6.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 263Zeile 263
	}
if(!$mybb->input['savedraft'] && !$pid)
{

	}
if(!$mybb->input['savedraft'] && !$pid)
{

		$query = $db->simple_select("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.dateline>".(TIME_NOW-600));



		$check_subject = utf8_handle_4byte_string($mybb->input['subject']);
$check_message = utf8_handle_4byte_string($mybb->input['message']);
$query = $db->simple_select("posts p", "p.pid", "$user_check AND p.fid='{$forum['fid']}' AND p.subject='".$db->escape_string($check_subject)."' AND p.message='".$db->escape_string($check_message)."' AND p.dateline>".(TIME_NOW-600));

		$duplicate_check = $db->fetch_field($query, "pid");
if($duplicate_check)
{

		$duplicate_check = $db->fetch_field($query, "pid");
if($duplicate_check)
{

Zeile 364Zeile 366
		$thread_info = $posthandler->insert_thread();
$tid = $thread_info['tid'];
$visible = $thread_info['visible'];

		$thread_info = $posthandler->insert_thread();
$tid = $thread_info['tid'];
$visible = $thread_info['visible'];

 

// Invalidate solved captcha
if($mybb->settings['captchaimage'] && !$mybb->user['uid'])
{
$post_captcha->invalidate_captcha();
}


// Mark thread as read
require_once MYBB_ROOT."inc/functions_indicators.php";


// Mark thread as read
require_once MYBB_ROOT."inc/functions_indicators.php";

Zeile 374Zeile 382
		{
$lang->redirect_newthread = $lang->draft_saved;
$url = "usercp.php?action=drafts";

		{
$lang->redirect_newthread = $lang->draft_saved;
$url = "usercp.php?action=drafts";

		}

		}


// A poll was being posted with this thread, throw them to poll posting page.
else if($mybb->input['postpoll'] && $forumpermissions['canpostpolls'])


// A poll was being posted with this thread, throw them to poll posting page.
else if($mybb->input['postpoll'] && $forumpermissions['canpostpolls'])

Zeile 391Zeile 399
			{
// User must see moderation notice, regardless of redirect settings
$mybb->user['showredirect'] = 1;

			{
// User must see moderation notice, regardless of redirect settings
$mybb->user['showredirect'] = 1;

			}


			}


			$lang->redirect_newthread .= $lang->redirect_newthread_moderation;
$url = get_forum_link($fid);
}

			$lang->redirect_newthread .= $lang->redirect_newthread_moderation;
$url = get_forum_link($fid);
}

Zeile 438Zeile 446
		$quoted_posts = array();
// Handle multiquote
if($mybb->cookies['multiquote'] && $mybb->settings['multiquote'] != 0)

		$quoted_posts = array();
// Handle multiquote
if($mybb->cookies['multiquote'] && $mybb->settings['multiquote'] != 0)

		{

		{

			$multiquoted = explode("|", $mybb->cookies['multiquote']);
foreach($multiquoted as $post)
{

			$multiquoted = explode("|", $mybb->cookies['multiquote']);
foreach($multiquoted as $post)
{

Zeile 564Zeile 572
	// Editing a draft thread
else if($mybb->input['action'] == "editdraft" && $mybb->user['uid'])
{

	// Editing a draft thread
else if($mybb->input['action'] == "editdraft" && $mybb->user['uid'])
{

 
		$mybb->input['threadprefix'] = $thread['prefix'];

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

Zeile 584Zeile 593
			$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\"";
}

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

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

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

Zeile 605Zeile 614
			$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\"";

			$postoptions_subscriptionmethod_instant = "checked=\"checked\"";

		}

		}

		else
{
$postoptions_subscriptionmethod_dont = "checked=\"checked\"";
}
$numpolloptions = "2";
}

		else
{
$postoptions_subscriptionmethod_dont = "checked=\"checked\"";
}
$numpolloptions = "2";
}





	// If we're preving a post then generate the preview.
if($mybb->input['previewpost'])
{

	// If we're preving a post then generate the preview.
if($mybb->input['previewpost'])
{

Zeile 639Zeile 648
		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();

Zeile 658Zeile 667
		if(count($post_errors) > 0)
{
$thread_errors = inline_error($post_errors);

		if(count($post_errors) > 0)
{
$thread_errors = inline_error($post_errors);

		}
else
{

		}
else
{

			if(!$mybb->input['username'])
{
$mybb->input['username'] = $lang->guest;

			if(!$mybb->input['username'])
{
$mybb->input['username'] = $lang->guest;

Zeile 697Zeile 706
			if($mybb->input['pid'])
{
$attachwhere = "pid='".intval($mybb->input['pid'])."'";

			if($mybb->input['pid'])
{
$attachwhere = "pid='".intval($mybb->input['pid'])."'";

			}

			}

			else
{
$attachwhere = "posthash='".$db->escape_string($mybb->input['posthash'])."'";

			else
{
$attachwhere = "posthash='".$db->escape_string($mybb->input['posthash'])."'";

Zeile 725Zeile 734

// Do we have attachment errors?
if(count($errors) > 0)


// Do we have attachment errors?
if(count($errors) > 0)

	{

	{

		$thread_errors = inline_error($errors);

		$thread_errors = inline_error($errors);

	}


	}


	// Generate thread prefix selector
if(!intval($mybb->input['threadprefix']))
{
$mybb->input['threadprefix'] = 0;

	// Generate thread prefix selector
if(!intval($mybb->input['threadprefix']))
{
$mybb->input['threadprefix'] = 0;

	}


	}


	$prefixselect = build_prefix_select($forum['fid'], $mybb->input['threadprefix']);

	$prefixselect = build_prefix_select($forum['fid'], $mybb->input['threadprefix']);





	$posthash = htmlspecialchars_uni($mybb->input['posthash']);

// Can we disable smilies or are they disabled already?
if($forum['allowsmilies'] != 0)

	$posthash = htmlspecialchars_uni($mybb->input['posthash']);

// Can we disable smilies or are they disabled already?
if($forum['allowsmilies'] != 0)

	{

	{

		eval("\$disablesmilies = \"".$templates->get("newthread_disablesmilies")."\";");
}
else

		eval("\$disablesmilies = \"".$templates->get("newthread_disablesmilies")."\";");
}
else

Zeile 768Zeile 777
		else
{
$stickycheck = '';

		else
{
$stickycheck = '';

		}

		}

		unset($modoptions);
eval("\$modoptions = \"".$templates->get("newreply_modoptions")."\";");
$bgcolor = "trow1";

		unset($modoptions);
eval("\$modoptions = \"".$templates->get("newreply_modoptions")."\";");
$bgcolor = "trow1";

Zeile 805Zeile 814
			if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))
{
eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";");

			if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))
{
eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";");

			}

eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";");


			}

eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";");


			$attach_mod_options = '';
if($attachment['visible'] != 1)
{

			$attach_mod_options = '';
if($attachment['visible'] != 1)
{

Zeile 827Zeile 836
			$noshowattach = 1;
}
if($mybb->usergroup['attachquota'] == 0)

			$noshowattach = 1;
}
if($mybb->usergroup['attachquota'] == 0)

		{

		{

			$friendlyquota = $lang->unlimited;
}
else

			$friendlyquota = $lang->unlimited;
}
else

Zeile 864Zeile 873
			if($post_captcha->validate_captcha() == true)
{
$correct = true;

			if($post_captcha->validate_captcha() == true)
{
$correct = true;





				// Generate a hidden list of items for our captcha
$captcha = $post_captcha->build_hidden_captcha();
}

				// Generate a hidden list of items for our captcha
$captcha = $post_captcha->build_hidden_captcha();
}

Zeile 873Zeile 882
		if(!$correct)
{
if($post_captcha->type == 1)

		if(!$correct)
{
if($post_captcha->type == 1)

			{

			{

				$post_captcha->build_captcha();

				$post_captcha->build_captcha();

			}

			}

			elseif($post_captcha->type == 2)

			elseif($post_captcha->type == 2)

			{

			{

				$post_captcha->build_recaptcha();

				$post_captcha->build_recaptcha();

			}

if($post_captcha->html)
{

			}

if($post_captcha->html)
{

				$captcha = $post_captcha->html;
}
}

				$captcha = $post_captcha->html;
}
}

Zeile 901Zeile 910
	{
$lang->max_options = $lang->sprintf($lang->max_options, $mybb->settings['maxpolloptions']);
eval("\$pollbox = \"".$templates->get("newthread_postpoll")."\";");

	{
$lang->max_options = $lang->sprintf($lang->max_options, $mybb->settings['maxpolloptions']);
eval("\$pollbox = \"".$templates->get("newthread_postpoll")."\";");

	}

	}


// Do we have any forum rules to show for this forum?
$forumrules = '';


// Do we have any forum rules to show for this forum?
$forumrules = '';

Zeile 910Zeile 919
		if(!$forum['rulestitle'])
{
$forum['rulestitle'] = $lang->sprintf($lang->forum_rules, $forum['name']);

		if(!$forum['rulestitle'])
{
$forum['rulestitle'] = $lang->sprintf($lang->forum_rules, $forum['name']);

		}

		}


if(!$parser)
{


if(!$parser)
{

Zeile 936Zeile 945
		{
eval("\$forumrules = \"".$templates->get("forumdisplay_rules_link")."\";");
}

		{
eval("\$forumrules = \"".$templates->get("forumdisplay_rules_link")."\";");
}

	}


	}


	$plugins->run_hooks("newthread_end");

$forum['name'] = strip_tags($forum['name']);

	$plugins->run_hooks("newthread_end");

$forum['name'] = strip_tags($forum['name']);

Zeile 955Zeile 964

eval("\$newthread = \"".$newthread_template."\";");
output_page($newthread);


eval("\$newthread = \"".$newthread_template."\";");
output_page($newthread);



 
}
?>

}
?>