Vergleich newreply.php - 1.8.19 - 1.8.22

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 88Zeile 88
// See if everything is valid up to here.
if(isset($post) && (($post['visible'] == 0 && !is_moderator($fid, "canviewunapprove")) || ($post['visible'] < 0 && $post['uid'] != $mybb->user['uid'])))
{

// See if everything is valid up to here.
if(isset($post) && (($post['visible'] == 0 && !is_moderator($fid, "canviewunapprove")) || ($post['visible'] < 0 && $post['uid'] != $mybb->user['uid'])))
{

	error($lang->error_invalidpost);




	if($post['visible'] == 0 && !($mybb->settings['showownunapproved'] && $post['uid'] == $mybb->user['uid']))
{
error($lang->error_invalidpost);
}

}
if(($thread['visible'] == 0 && !is_moderator($fid, "canviewunapprove")) || $thread['visible'] < 0)
{

}
if(($thread['visible'] == 0 && !is_moderator($fid, "canviewunapprove")) || $thread['visible'] < 0)
{

	error($lang->error_invalidthread);




	if($thread['visible'] == 0 && !($mybb->settings['showownunapproved'] && $thread['uid'] == $mybb->user['uid']))
{
error($lang->error_invalidthread);
}

}
if($forum['open'] == 0 || $forum['type'] != "f")
{

}
if($forum['open'] == 0 || $forum['type'] != "f")
{

Zeile 240Zeile 246
	{
eval("\$editdraftpid = \"".$templates->get("newreply_draftinput")."\";");
$mybb->input['action'] = "newreply";

	{
eval("\$editdraftpid = \"".$templates->get("newreply_draftinput")."\";");
$mybb->input['action'] = "newreply";

 
	}

if($mybb->get_input('ajax', MyBB::INPUT_INT) == 1)
{
header("Content-type: application/json; charset={$lang->settings['charset']}");
echo json_encode(array("success" => true));
exit();

	}
}


	}
}


Zeile 248Zeile 261
$hide_captcha = false;

// Check the maximum posts per day for this user

$hide_captcha = false;

// Check the maximum posts per day for this user

if($mybb->usergroup['maxposts'] > 0 && $mybb->usergroup['cancp'] != 1)

if($mybb->usergroup['maxposts'] > 0)

{
$daycut = TIME_NOW-60*60*24;

{
$daycut = TIME_NOW-60*60*24;

	$query = $db->simple_select("posts", "COUNT(*) AS posts_today", "uid='{$mybb->user['uid']}' AND visible='1' AND dateline>{$daycut}");

	$query = $db->simple_select("posts", "COUNT(*) AS posts_today", "uid='{$mybb->user['uid']}' AND visible !='-1' AND dateline>{$daycut}");

	$post_count = $db->fetch_field($query, "posts_today");
if($post_count >= $mybb->usergroup['maxposts'])
{

	$post_count = $db->fetch_field($query, "posts_today");
if($post_count >= $mybb->usergroup['maxposts'])
{

Zeile 643Zeile 656
				$data .= "<script type=\"text/javascript\">\n";
$data .= "var hash = document.getElementById('posthash'); if(hash) { hash.value = '{$new_posthash}'; }\n";
$data .= "if(typeof(inlineModeration) != 'undefined') {

				$data .= "<script type=\"text/javascript\">\n";
$data .= "var hash = document.getElementById('posthash'); if(hash) { hash.value = '{$new_posthash}'; }\n";
$data .= "if(typeof(inlineModeration) != 'undefined') {

					$('#inlinemod_{$pid}').bind(\"click\", function(e) {

					$('#inlinemod_{$pid}').on(\"click\", function(e) {

						inlineModeration.checkItem();
});
}\n";

						inlineModeration.checkItem();
});
}\n";

Zeile 974Zeile 987

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


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

		{

		{

			$reply_errors = inline_error($post_errors);
}
else

			$reply_errors = inline_error($post_errors);
}
else

Zeile 1186Zeile 1199
			$mybb->settings['postsperpage'] = 20;
}


			$mybb->settings['postsperpage'] = 20;
}


		if(is_moderator($fid, "canviewunapprove"))

		if(is_moderator($fid, "canviewunapprove") || $mybb->settings['showownunapproved'])

		{
$visibility = "(visible='1' OR visible='0')";
}

		{
$visibility = "(visible='1' OR visible='0')";
}

Zeile 1270Zeile 1283
			{
$altbg = "trow_shaded";
}

			{
$altbg = "trow_shaded";
}

 

$plugins->run_hooks("newreply_threadreview_post");


$post['message'] = $parser->parse_message($post['message'], $parser_options);
get_post_attachments($post['pid'], $post);


$post['message'] = $parser->parse_message($post['message'], $parser_options);
get_post_attachments($post['pid'], $post);