Vergleich newreply.php - 1.8.27 - 1.8.31

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 630Zeile 630

// 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 1179Zeile 1179
		}

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 1205Zeile 1209

// 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();

			}
}


			}
}


		if(!$correct)
{
if($post_captcha->type == captcha::DEFAULT_CAPTCHA)

		if(!$correct)
{
if($post_captcha->type == captcha::DEFAULT_CAPTCHA)

			{

			{

				$post_captcha->build_captcha();

				$post_captcha->build_captcha();

			}

			}

			elseif(in_array($post_captcha->type, array(captcha::NOCAPTCHA_RECAPTCHA, captcha::RECAPTCHA_INVISIBLE, captcha::RECAPTCHA_V3)))
{
$post_captcha->build_recaptcha();

			elseif(in_array($post_captcha->type, array(captcha::NOCAPTCHA_RECAPTCHA, captcha::RECAPTCHA_INVISIBLE, captcha::RECAPTCHA_V3)))
{
$post_captcha->build_recaptcha();

Zeile 1221Zeile 1225
			elseif(in_array($post_captcha->type, array(captcha::HCAPTCHA, captcha::HCAPTCHA_INVISIBLE)))
{
$post_captcha->build_hcaptcha();

			elseif(in_array($post_captcha->type, array(captcha::HCAPTCHA, captcha::HCAPTCHA_INVISIBLE)))
{
$post_captcha->build_hcaptcha();

			}

			}

		}
else if($correct && (in_array($post_captcha->type, array(captcha::NOCAPTCHA_RECAPTCHA, captcha::RECAPTCHA_INVISIBLE, captcha::RECAPTCHA_V3))))
{
$post_captcha->build_recaptcha();
}
else if($correct && (in_array($post_captcha->type, array(captcha::HCAPTCHA, captcha::HCAPTCHA_INVISIBLE))))

		}
else if($correct && (in_array($post_captcha->type, array(captcha::NOCAPTCHA_RECAPTCHA, captcha::RECAPTCHA_INVISIBLE, captcha::RECAPTCHA_V3))))
{
$post_captcha->build_recaptcha();
}
else if($correct && (in_array($post_captcha->type, array(captcha::HCAPTCHA, captcha::HCAPTCHA_INVISIBLE))))

		{

		{

			$post_captcha->build_hcaptcha();
}

if($post_captcha->html)
{
$captcha = $post_captcha->html;

			$post_captcha->build_hcaptcha();
}

if($post_captcha->html)
{
$captcha = $post_captcha->html;

		}

		}

	}

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

Zeile 1259Zeile 1264
			eval("\$reviewmore = \"".$templates->get("newreply_threadreview_more")."\";");
}


			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']));
while($post = $db->fetch_array($query))
{
$pidin[] = $post['pid'];
}


		$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))
{
$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;
}

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

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






			}

			}


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

if($post['visible'] != 1)








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

			{

			{

				$altbg = "trow_shaded";
}





























				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']);





			$plugins->run_hooks("newreply_threadreview_post");




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





			$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";




				$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";
}

			}

			}

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

		}

		}

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

 
	}

// Hide signature option if no permission

	}

// Hide signature option if no permission