Vergleich newreply.php - 1.8.18 - 1.8.21

  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 146Zeile 152

// Display a login box or change user box?
if($mybb->user['uid'] != 0)


// Display a login box or change user box?
if($mybb->user['uid'] != 0)

{

{

	$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']);
eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");
}

	$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']);
eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");
}

Zeile 182Zeile 188
if(!empty($mybb->input['previewpost']))
{
$mybb->input['action'] = "newreply";

if(!empty($mybb->input['previewpost']))
{
$mybb->input['action'] = "newreply";

}


}


// Setup a unique posthash for attachment management
if(!$mybb->get_input('posthash') && !$pid)
{

// Setup a unique posthash for attachment management
if(!$mybb->get_input('posthash') && !$pid)
{

Zeile 221Zeile 227
	}

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

	}

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

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

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

	}
}


	}
}


Zeile 233Zeile 239
{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));





	require_once MYBB_ROOT."inc/functions_upload.php";
remove_attachment($pid, $mybb->get_input('posthash'), $mybb->get_input('attachmentaid', MyBB::INPUT_INT));
if(!$mybb->get_input('submit'))

	require_once MYBB_ROOT."inc/functions_upload.php";
remove_attachment($pid, $mybb->get_input('posthash'), $mybb->get_input('attachmentaid', MyBB::INPUT_INT));
if(!$mybb->get_input('submit'))

	{

	{

		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 832Zeile 845
	$message = htmlspecialchars_uni($message);

$postoptionschecked = array('signature' => '', 'disablesmilies' => '');

	$message = htmlspecialchars_uni($message);

$postoptionschecked = array('signature' => '', 'disablesmilies' => '');

	$postoptions_subscriptionmethod_dont = $postoptions_subscriptionmethod_none = $postoptions_subscriptionmethod_email = $postoptions_subscriptionmethod_pm = '';

	$subscribe = $nonesubscribe = $emailsubscribe = $pmsubscribe = '';


// Set up the post options.
if(!empty($mybb->input['previewpost']) || $reply_errors != '')


// Set up the post options.
if(!empty($mybb->input['previewpost']) || $reply_errors != '')

Zeile 873Zeile 886
		}
$subscription_method = get_subscription_method($tid);
}

		}
$subscription_method = get_subscription_method($tid);
}

	${'postoptions_subscriptionmethod_'.$subscription_method} = "checked=\"checked\"";

	${$subscription_method.'subscribe'} = "checked=\"checked\" ";


if($forum['allowpicons'] != 0)
{


if($forum['allowpicons'] != 0)
{

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')";
}