Vergleich newreply.php - 1.8.27 - 1.8.36

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 230Zeile 230
				eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";");
}
eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";");

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

 
			$attach_mod_options = '';

			eval("\$attemplate = \"".$templates->get("post_attachments_attachment")."\";");
$ret['template'] = $attemplate;


			eval("\$attemplate = \"".$templates->get("post_attachments_attachment")."\";");
$ret['template'] = $attemplate;


Zeile 494Zeile 495
			//header("Content-type: text/html; charset={$lang->settings['charset']}");
$data = '';
$data .= "<captcha>$imagehash";

			//header("Content-type: text/html; charset={$lang->settings['charset']}");
$data = '';
$data .= "<captcha>$imagehash";





			if($hide_captcha)
{
$data .= "|$randomstr";

			if($hide_captcha)
{
$data .= "|$randomstr";

Zeile 526Zeile 527
		else
{
$closed = '';

		else
{
$closed = '';

		}

		}


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


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

Zeile 575Zeile 576
				if(is_array($multiquote) && is_array($quoted_ids))
{
foreach($multiquote as $key => $quoteid)

				if(is_array($multiquote) && is_array($quoted_ids))
{
foreach($multiquote as $key => $quoteid)

					{

					{

						// If this ID was quoted, remove it from the multiquote list
if(in_array($quoteid, $quoted_ids))
{
unset($multiquote[$key]);
}

						// If this ID was quoted, remove it from the multiquote list
if(in_array($quoteid, $quoted_ids))
{
unset($multiquote[$key]);
}

					}

					}

					// Still have an array - set the new cookie
if(is_array($multiquote))
{
$new_multiquote = implode(",", $multiquote);
my_setcookie("multiquote", $new_multiquote);

					// Still have an array - set the new cookie
if(is_array($multiquote))
{
$new_multiquote = implode(",", $multiquote);
my_setcookie("multiquote", $new_multiquote);

					}

					}

					// Otherwise, unset it
else
{
my_unsetcookie("multiquote");

					// Otherwise, unset it
else
{
my_unsetcookie("multiquote");

					}

					}

				}
}
}

				}
}
}

Zeile 625Zeile 626
					if($new_post['pid'] != $mybb->get_input('lastpid', MyBB::INPUT_INT))
{
redirect(get_thread_link($tid, 0, "lastpost"));

					if($new_post['pid'] != $mybb->get_input('lastpid', MyBB::INPUT_INT))
{
redirect(get_thread_link($tid, 0, "lastpost"));

					}
}


					}
}


				// Lets see if this post is on the same page as the one we're viewing or not
// if it isn't, redirect us

				// Lets see if this post is on the same page as the one we're viewing or not
// if it isn't, redirect us

				if($perpage > 0 && (($postcounter) % $perpage) == 0)

				if($mybb->settings['postsperpage'] > 0)

				{

				{

					$post_page = ($postcounter) / $mybb->settings['postsperpage'];

					$post_page = ceil(($postcounter + 1) / $mybb->settings['postsperpage']);

				}
else
{

				}
else
{

					$post_page = (int)($postcounter / $mybb->settings['postsperpage']) + 1;

					$post_page = 1;

				}

if($post_page > $mybb->get_input('from_page', MyBB::INPUT_INT))

				}

if($post_page > $mybb->get_input('from_page', MyBB::INPUT_INT))

Zeile 893Zeile 894
			$postoptionschecked['signature'] = " checked=\"checked\"";
}
if(isset($postoptions['disablesmilies']) && $postoptions['disablesmilies'] == 1)

			$postoptionschecked['signature'] = " checked=\"checked\"";
}
if(isset($postoptions['disablesmilies']) && $postoptions['disablesmilies'] == 1)

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

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

		}
$subscription_method = get_subscription_method($tid, $postoptions);
$subject = $mybb->input['subject'];

		}
$subscription_method = get_subscription_method($tid, $postoptions);
$subject = $mybb->input['subject'];

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

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

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

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

	{

	{

		$posticons = get_post_icons();
}


		$posticons = get_post_icons();
}


Zeile 1008Zeile 1009
		if($post['uid'] == 0)
{
$valid_username = $posthandler->verify_author();

		if($post['uid'] == 0)
{
$valid_username = $posthandler->verify_author();

		}
else
{
$valid_username = true;

		}
else
{
$valid_username = true;

		}

$post_errors = array();

		}

$post_errors = array();

Zeile 1025Zeile 1026
		if(count($post_errors) > 0)
{
$reply_errors = inline_error($post_errors);

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

		}
else
{

		}
else
{

			$quote_ids = htmlspecialchars_uni($mybb->get_input('quote_ids'));
$mybb->input['icon'] = $mybb->get_input('icon', MyBB::INPUT_INT);
$query = $db->query("

			$quote_ids = htmlspecialchars_uni($mybb->get_input('quote_ids'));
$mybb->input['icon'] = $mybb->get_input('icon', MyBB::INPUT_INT);
$query = $db->query("

Zeile 1110Zeile 1111
			$attachment['size'] = get_friendly_size($attachment['filesize']);
$attachment['icon'] = get_attachment_icon(get_extension($attachment['filename']));
$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);

			$attachment['size'] = get_friendly_size($attachment['filesize']);
$attachment['icon'] = get_attachment_icon(get_extension($attachment['filename']));
$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);





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

Zeile 1142Zeile 1143
		if($mybb->usergroup['attachquota'] == 0)
{
$friendlyquota = $lang->unlimited;

		if($mybb->usergroup['attachquota'] == 0)
{
$friendlyquota = $lang->unlimited;

		}
else

		}
else

		{
$friendlyquota = get_friendly_size($mybb->usergroup['attachquota']*1024);
}

		{
$friendlyquota = get_friendly_size($mybb->usergroup['attachquota']*1024);
}

Zeile 1151Zeile 1152

$link_viewattachments = '';
if($usage['ausage'] !== NULL)


$link_viewattachments = '';
if($usage['ausage'] !== NULL)

		{

		{

			$friendlyusage = get_friendly_size($usage['ausage']);
$lang->attach_usage = $lang->sprintf($lang->attach_usage, $friendlyusage);
eval("\$link_viewattachments = \"".$templates->get("post_attachments_viewlink")."\";");

			$friendlyusage = get_friendly_size($usage['ausage']);
$lang->attach_usage = $lang->sprintf($lang->attach_usage, $friendlyusage);
eval("\$link_viewattachments = \"".$templates->get("post_attachments_viewlink")."\";");

Zeile 1159Zeile 1160
		else
{
$lang->attach_usage = "";

		else
{
$lang->attach_usage = "";

		}

		}


$attach_add_options = '';
if($mybb->settings['maxattachments'] == 0 || ($mybb->settings['maxattachments'] != 0 && $attachcount < $mybb->settings['maxattachments']) && !$noshowattach)
{
eval("\$attach_add_options = \"".$templates->get("post_attachments_add")."\";");


$attach_add_options = '';
if($mybb->settings['maxattachments'] == 0 || ($mybb->settings['maxattachments'] != 0 && $attachcount < $mybb->settings['maxattachments']) && !$noshowattach)
{
eval("\$attach_add_options = \"".$templates->get("post_attachments_add")."\";");

		}


		}


		$attach_update_options = '';
if(($mybb->usergroup['caneditattachments'] || $forumpermissions['caneditattachments']) && $attachcount > 0)
{

		$attach_update_options = '';
if(($mybb->usergroup['caneditattachments'] || $forumpermissions['caneditattachments']) && $attachcount > 0)
{

Zeile 1176Zeile 1177
		if($attach_add_options || $attach_update_options)
{
eval("\$newattach = \"".$templates->get("post_attachments_new")."\";");

		if($attach_add_options || $attach_update_options)
{
eval("\$newattach = \"".$templates->get("post_attachments_new")."\";");

		}

		}


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


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

 
	}
else
{
$attachbox = '';

	}

// If the user is logged in, provide a save draft button.

	}

// If the user is logged in, provide a save draft button.

Zeile 1209Zeile 1214
		}

if(!$correct)

		}

if(!$correct)

		{

		{

			if($post_captcha->type == captcha::DEFAULT_CAPTCHA)
{
$post_captcha->build_captcha();

			if($post_captcha->type == captcha::DEFAULT_CAPTCHA)
{
$post_captcha->build_captcha();

Zeile 1239Zeile 1244
	}

$reviewmore = '';

	}

$reviewmore = '';

 
	$threadreview = '';

	if($mybb->settings['threadreview'] != 0)
{
if(is_moderator($fid, "canviewunapprove") || $mybb->settings['showownunapproved'])

	if($mybb->settings['threadreview'] != 0)
{
if(is_moderator($fid, "canviewunapprove") || $mybb->settings['showownunapproved'])

		{

		{

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

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

Zeile 1251Zeile 1257
		}
$query = $db->simple_select("posts", "COUNT(pid) AS post_count", "tid='{$tid}' AND {$visibility}");
$numposts = $db->fetch_field($query, "post_count");

		}
$query = $db->simple_select("posts", "COUNT(pid) AS post_count", "tid='{$tid}' AND {$visibility}");
$numposts = $db->fetch_field($query, "post_count");





		if($numposts > $mybb->settings['postsperpage'])
{
$numposts = $mybb->settings['postsperpage'];
$lang->thread_review_more = $lang->sprintf($lang->thread_review_more, $mybb->settings['postsperpage'], get_thread_link($tid));
eval("\$reviewmore = \"".$templates->get("newreply_threadreview_more")."\";");

		if($numposts > $mybb->settings['postsperpage'])
{
$numposts = $mybb->settings['postsperpage'];
$lang->thread_review_more = $lang->sprintf($lang->thread_review_more, $mybb->settings['postsperpage'], get_thread_link($tid));
eval("\$reviewmore = \"".$templates->get("newreply_threadreview_more")."\";");

		}



		}

$pidin = array();

		$query = $db->simple_select("posts", "pid", "tid='{$tid}' AND {$visibility}", array("order_by" => "dateline DESC, pid DESC", "limit" => $mybb->settings['postsperpage']));

		$query = $db->simple_select("posts", "pid", "tid='{$tid}' AND {$visibility}", array("order_by" => "dateline DESC, pid DESC", "limit" => $mybb->settings['postsperpage']));

		while($post = $db->fetch_array($query))
{

		while($post = $db->fetch_array($query))
{

			$pidin[] = $post['pid'];

			$pidin[] = $post['pid'];

		}

$pidin = implode(",", $pidin);

		}







		// Fetch attachments
$query = $db->simple_select("attachments", "*", "pid IN ($pidin)");
while($attachment = $db->fetch_array($query))
{
$attachcache[$attachment['pid']][$attachment['aid']] = $attachment;
}
$query = $db->query("
SELECT p.*, u.username AS userusername
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)
WHERE pid IN ($pidin)
ORDER BY dateline DESC, pid DESC
");
$postsdone = 0;
$altbg = "trow1";
$reviewbits = '';
while($post = $db->fetch_array($query))

		if(!empty($pidin))

















		{

		{

			if($post['userusername'])
{
$post['username'] = $post['userusername'];
}
$reviewpostdate = my_date('relative', $post['dateline']);
$parser_options = array(
"allow_html" => $forum['allowhtml'],
"allow_mycode" => $forum['allowmycode'],
"allow_smilies" => $forum['allowsmilies'],
"allow_imgcode" => $forum['allowimgcode'],
"allow_videocode" => $forum['allowvideocode'],
"me_username" => $post['username'],
"filter_badwords" => 1
);
if($post['smilieoff'] == 1)
{
$parser_options['allow_smilies'] = 0;
}

			$pidin = implode(",", $pidin);






















			if($mybb->user['uid'] != 0 && $mybb->user['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)



			// Fetch attachments
$query = $db->simple_select("attachments", "*", "pid IN ($pidin)");
while($attachment = $db->fetch_array($query))

			{

			{

				$parser_options['allow_imgcode'] = 0;

				$attachcache[$attachment['pid']][$attachment['aid']] = $attachment;

			}

			}


if($mybb->user['uid'] != 0 && $mybb->user['showvideos'] != 1 || $mybb->settings['guestvideos'] != 1 && $mybb->user['uid'] == 0)










			$query = $db->query("
SELECT p.*, u.username AS userusername
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)
WHERE pid IN ($pidin)
ORDER BY dateline DESC, pid DESC
");
$postsdone = 0;
$altbg = "trow1";
$reviewbits = '';
while($post = $db->fetch_array($query))

			{

			{

				$parser_options['allow_videocode'] = 0;
}

$post['username'] = htmlspecialchars_uni($post['username']);
































				if($post['userusername'])
{
$post['username'] = $post['userusername'];
}
$reviewpostdate = my_date('relative', $post['dateline']);
$parser_options = array(
"allow_html" => $forum['allowhtml'],
"allow_mycode" => $forum['allowmycode'],
"allow_smilies" => $forum['allowsmilies'],
"allow_imgcode" => $forum['allowimgcode'],
"allow_videocode" => $forum['allowvideocode'],
"me_username" => $post['username'],
"filter_badwords" => 1
);
if($post['smilieoff'] == 1)
{
$parser_options['allow_smilies'] = 0;
}

if($mybb->user['uid'] != 0 && $mybb->user['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
{
$parser_options['allow_imgcode'] = 0;
}

if($mybb->user['uid'] != 0 && $mybb->user['showvideos'] != 1 || $mybb->settings['guestvideos'] != 1 && $mybb->user['uid'] == 0)
{
$parser_options['allow_videocode'] = 0;
}

$post['username'] = htmlspecialchars_uni($post['username']);

if($post['visible'] != 1)
{
$altbg = "trow_shaded";
}





			if($post['visible'] != 1)
{
$altbg = "trow_shaded";
}

				$plugins->run_hooks("newreply_threadreview_post");








			$plugins->run_hooks("newreply_threadreview_post");

$post['message'] = $parser->parse_message($post['message'], $parser_options);
get_post_attachments($post['pid'], $post);
$reviewmessage = $post['message'];
eval("\$reviewbits .= \"".$templates->get("newreply_threadreview_post")."\";");
if($altbg == "trow1")
{
$altbg = "trow2";
}
else
{
$altbg = "trow1";

				$post['message'] = $parser->parse_message($post['message'], $parser_options);
get_post_attachments($post['pid'], $post);
$reviewmessage = $post['message'];
eval("\$reviewbits .= \"".$templates->get("newreply_threadreview_post")."\";");
if($altbg == "trow1")
{
$altbg = "trow2";
}
else
{
$altbg = "trow1";
}


			}

			}

 
			eval("\$threadreview = \"".$templates->get("newreply_threadreview")."\";");

		}

		}

		eval("\$threadreview = \"".$templates->get("newreply_threadreview")."\";");

 
	}

// Hide signature option if no permission

	}

// Hide signature option if no permission