Vergleich newreply.php - 1.8.9 - 1.8.15

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

$templatelist = "newreply,previewpost,loginbox,changeuserbox,posticons,newreply_threadreview,newreply_threadreview_post,forumdisplay_rules_link,newreply_multiquote_external,post_attachments_add,post_subscription_method";
$templatelist .= ",codebuttons,post_attachments_new,post_attachments,post_savedraftbutton,newreply_modoptions,newreply_threadreview_more,postbit_online,postbit_pm,newreply_disablesmilies_hidden,post_attachments_update";


$templatelist = "newreply,previewpost,loginbox,changeuserbox,posticons,newreply_threadreview,newreply_threadreview_post,forumdisplay_rules_link,newreply_multiquote_external,post_attachments_add,post_subscription_method";
$templatelist .= ",codebuttons,post_attachments_new,post_attachments,post_savedraftbutton,newreply_modoptions,newreply_threadreview_more,postbit_online,postbit_pm,newreply_disablesmilies_hidden,post_attachments_update";

$templatelist .= ",postbit_www,postbit_email,postbit_reputation,postbit_warninglevel,postbit_author_user,postbit_edit,postbit_quickdelete,postbit_inlinecheck,postbit_posturl,postbit_quote,postbit_multiquote,postbit_icon";
$templatelist .= ",post_attachments_attachment_postinsert,post_attachments_attachment_remove,post_attachments_attachment_unapproved,post_attachments_attachment,postbit_attachments_attachment,newreply_signature,postbit_report";
$templatelist .= ",member_register_regimage,member_register_regimage_recaptcha,post_captcha_hidden,post_captcha,post_captcha_recaptcha,post_captcha_nocaptcha,postbit_groupimage,postbit_attachments,newreply_postoptions";
$templatelist .= ",postbit_rep_button,postbit_warn,postbit_author_guest,postbit_signature,postbit_classic,postbit_attachments_thumbnails_thumbnailpostbit_attachments_images_image,postbit_attachments_attachment_unapproved";
$templatelist .= ",postbit_attachments_thumbnails,postbit_attachments_images,postbit_gotopost,forumdisplay_password_wrongpass,forumdisplay_password,posticons_icon,attachment_icon,postbit_reputation_formatted_link,postbit_away";
$templatelist .= ",global_moderation_notice,newreply_disablesmilies,postbit_userstar,newreply_draftinput,postbit_avatar,forumdisplay_rules,postbit_offline,postbit_find,postbit_warninglevel_formatted,postbit_ignored,postbit";


$templatelist .= ",postbit_warninglevel,postbit_author_user,postbit_edit,postbit_quickdelete,postbit_inlinecheck,postbit_posturl,postbit_quote,postbit_multiquote,newreply_modoptions_close,newreply_modoptions_stick";
$templatelist .= ",post_attachments_attachment_postinsert,post_attachments_attachment_remove,post_attachments_attachment_unapproved,post_attachments_attachment,postbit_attachments_attachment,newreply_signature";
$templatelist .= ",post_captcha_recaptcha_invisible,post_captcha_hidden,post_captcha,post_captcha_recaptcha,post_captcha_nocaptcha,postbit_groupimage,postbit_attachments,newreply_postoptions";
$templatelist .= ",postbit_rep_button,postbit_author_guest,postbit_signature,postbit_classic,postbit_attachments_thumbnails_thumbnailpostbit_attachments_images_image,postbit_attachments_attachment_unapproved";
$templatelist .= ",postbit_attachments_thumbnails,postbit_attachments_images,postbit_gotopost,forumdisplay_password_wrongpass,forumdisplay_password,posticons_icon,attachment_icon,postbit_reputation_formatted_link";
$templatelist .= ",global_moderation_notice,newreply_disablesmilies,postbit_userstar,newreply_draftinput,postbit_avatar,forumdisplay_rules,postbit_offline,postbit_find,postbit_warninglevel_formatted,postbit_ignored";
$templatelist .= ",postbit_profilefield_multiselect_value,postbit_profilefield_multiselect,postbit_reputation,postbit_www,postbit_away,postbit_icon,postbit_email,postbit_report,postbit,postbit_warn";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";

Zeile 304Zeile 305
	// If this isn't a logged in user, then we need to do some special validation.
if($mybb->user['uid'] == 0)
{

	// If this isn't a logged in user, then we need to do some special validation.
if($mybb->user['uid'] == 0)
{

		// If they didn't specify a username then give them "Guest"

		// If they didn't specify a username leave blank so $lang->guest can be used on output

		if(!$mybb->get_input('username'))
{

		if(!$mybb->get_input('username'))
{

			$username = $lang->guest;

			$username = '';

		}
// Otherwise use the name they specified.
else

		}
// Otherwise use the name they specified.
else

Zeile 771Zeile 772
			$group_permissions = forum_permissions();
$onlyusfids = array();
$onlyusforums = '';

			$group_permissions = forum_permissions();
$onlyusfids = array();
$onlyusforums = '';

			foreach($group_permissions as $fid => $forum_permissions)

			foreach($group_permissions as $gpfid => $forum_permissions)

			{
if(isset($forum_permissions['canonlyviewownthreads']) && $forum_permissions['canonlyviewownthreads'] == 1)
{

			{
if(isset($forum_permissions['canonlyviewownthreads']) && $forum_permissions['canonlyviewownthreads'] == 1)
{

					$onlyusfids[] = $fid;

					$onlyusfids[] = $gpfid;

				}
}
if(!empty($onlyusfids))

				}
}
if(!empty($onlyusfids))

Zeile 995Zeile 996
		// If this isn't a logged in user, then we need to do some special validation.
if($mybb->user['uid'] == 0)
{

		// If this isn't a logged in user, then we need to do some special validation.
if($mybb->user['uid'] == 0)
{

			// If they didn't specify a username then give them "Guest"

			// If they didn't specify a username leave blank so $lang->guest can be used on output

			if(!$mybb->get_input('username'))
{

			if(!$mybb->get_input('username'))
{

				$username = $lang->guest;

				$username = '';

			}
// Otherwise use the name they specified.
else

			}
// Otherwise use the name they specified.
else

Zeile 1069Zeile 1070
		else
{
$quote_ids = htmlspecialchars_uni($mybb->get_input('quote_ids'));

		else
{
$quote_ids = htmlspecialchars_uni($mybb->get_input('quote_ids'));

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

 
			$mybb->input['icon'] = $mybb->get_input('icon', MyBB::INPUT_INT);
$query = $db->query("
SELECT u.*, f.*

			$mybb->input['icon'] = $mybb->get_input('icon', MyBB::INPUT_INT);
$query = $db->query("
SELECT u.*, f.*

Zeile 1081Zeile 1078
				WHERE u.uid='".$mybb->user['uid']."'
");
$post = $db->fetch_array($query);

				WHERE u.uid='".$mybb->user['uid']."'
");
$post = $db->fetch_array($query);

			if(!$mybb->user['uid'] || !$post['username'])


			$post['username'] = $username;
if($mybb->user['uid'])

			{

			{

				$post['username'] = $mybb->get_input('username');
}
else
{
$post['userusername'] = $mybb->user['username'];
$post['username'] = $mybb->user['username'];

				$post['userusername'] = $mybb->user['username'];






			}
$post['message'] = $previewmessage;
$post['subject'] = $subject;

			}
$post['message'] = $previewmessage;
$post['subject'] = $subject;

Zeile 1104Zeile 1097
				$post['includesig'] = $mybb->input['postoptions']['signature'];
}
if(!isset($post['includesig']) || $post['includesig'] != 1)

				$post['includesig'] = $mybb->input['postoptions']['signature'];
}
if(!isset($post['includesig']) || $post['includesig'] != 1)

			{

			{

				$post['includesig'] = 0;
}


				$post['includesig'] = 0;
}


Zeile 1114Zeile 1107
				$attachwhere = "pid='".$mybb->get_input('pid', MyBB::INPUT_INT)."'";
}
else

				$attachwhere = "pid='".$mybb->get_input('pid', MyBB::INPUT_INT)."'";
}
else

			{

			{

				$attachwhere = "posthash='".$db->escape_string($mybb->get_input('posthash'))."'";
}

$query = $db->simple_select("attachments", "*", $attachwhere);
while($attachment = $db->fetch_array($query))

				$attachwhere = "posthash='".$db->escape_string($mybb->get_input('posthash'))."'";
}

$query = $db->simple_select("attachments", "*", $attachwhere);
while($attachment = $db->fetch_array($query))

			{

			{

				$attachcache[0][$attachment['aid']] = $attachment;
}

$postbit = build_postbit($post, 1);
eval("\$preview = \"".$templates->get("previewpost")."\";");

				$attachcache[0][$attachment['aid']] = $attachment;
}

$postbit = build_postbit($post, 1);
eval("\$preview = \"".$templates->get("previewpost")."\";");

		}

		}

	}

	}





	$subject = htmlspecialchars_uni($parser->parse_badwords($subject));

$posthash = htmlspecialchars_uni($mybb->get_input('posthash'));

	$subject = htmlspecialchars_uni($parser->parse_badwords($subject));

$posthash = htmlspecialchars_uni($mybb->get_input('posthash'));





	// Do we have attachment errors?
if(count($errors) > 0)
{
$reply_errors = inline_error($errors);
}

	// Do we have attachment errors?
if(count($errors) > 0)
{
$reply_errors = inline_error($errors);
}





	// Get a listing of the current attachments.
if($mybb->settings['enableattachments'] != 0 && $forumpermissions['canpostattachments'] != 0)
{

	// Get a listing of the current attachments.
if($mybb->settings['enableattachments'] != 0 && $forumpermissions['canpostattachments'] != 0)
{

Zeile 1166Zeile 1159

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


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





			if($attachment['visible'] != 1)
{
eval("\$attachments .= \"".$templates->get("post_attachments_attachment_unapproved")."\";");

			if($attachment['visible'] != 1)
{
eval("\$attachments .= \"".$templates->get("post_attachments_attachment_unapproved")."\";");

Zeile 1176Zeile 1169
				eval("\$attachments .= \"".$templates->get("post_attachments_attachment")."\";");
}
$attachcount++;

				eval("\$attachments .= \"".$templates->get("post_attachments_attachment")."\";");
}
$attachcount++;

		}


		}


		$noshowattach = '';
$query = $db->simple_select("attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'");
$usage = $db->fetch_array($query);

if($usage['ausage'] > ($mybb->usergroup['attachquota']*1024) && $mybb->usergroup['attachquota'] != 0)

		$noshowattach = '';
$query = $db->simple_select("attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'");
$usage = $db->fetch_array($query);

if($usage['ausage'] > ($mybb->usergroup['attachquota']*1024) && $mybb->usergroup['attachquota'] != 0)

		{

		{

			$noshowattach = 1;
}

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

			$noshowattach = 1;
}

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

		{

		{

			$friendlyquota = $lang->unlimited;

			$friendlyquota = $lang->unlimited;

		}

		}

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

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

		}


		}


		$friendlyusage = get_friendly_size($usage['ausage']);
$lang->attach_quota = $lang->sprintf($lang->attach_quota, $friendlyusage, $friendlyquota);

if($mybb->settings['maxattachments'] == 0 || ($mybb->settings['maxattachments'] != 0 && $attachcount < $mybb->settings['maxattachments']) && !$noshowattach)

		$friendlyusage = get_friendly_size($usage['ausage']);
$lang->attach_quota = $lang->sprintf($lang->attach_quota, $friendlyusage, $friendlyquota);

if($mybb->settings['maxattachments'] == 0 || ($mybb->settings['maxattachments'] != 0 && $attachcount < $mybb->settings['maxattachments']) && !$noshowattach)

		{

		{

			eval("\$attach_add_options = \"".$templates->get("post_attachments_add")."\";");
}


			eval("\$attach_add_options = \"".$templates->get("post_attachments_add")."\";");
}


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

	}


	}


	// If the user is logged in, provide a save draft button.
if($mybb->user['uid'])
{

	// If the user is logged in, provide a save draft button.
if($mybb->user['uid'])
{

Zeile 1236Zeile 1229
			// If previewing a post - check their current captcha input - if correct, hide the captcha input area
// ... but only if it's a default one, reCAPTCHA and Are You a Human must be filled in every time due to draconian limits
if($post_captcha->validate_captcha() == true)

			// If previewing a post - check their current captcha input - if correct, hide the captcha input area
// ... but only if it's a default one, reCAPTCHA and Are You a Human must be filled in every time due to draconian limits
if($post_captcha->validate_captcha() == true)

			{

			{

				$correct = true;

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

				$correct = true;

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

			}

			}

		}

if(!$correct)

		}

if(!$correct)

Zeile 1250Zeile 1243
			{
$post_captcha->build_captcha();
}

			{
$post_captcha->build_captcha();
}

			elseif($post_captcha->type == 2 || $post_captcha->type == 4)

			elseif(in_array($post_captcha->type, array(2, 4, 5)))

			{
$post_captcha->build_recaptcha();

			{
$post_captcha->build_recaptcha();

			}

if($post_captcha->html)
{
$captcha = $post_captcha->html;
}
}
else if($correct && ($post_captcha->type == 2 || $post_captcha->type == 4))
{

			}

if($post_captcha->html)
{
$captcha = $post_captcha->html;
}
}
else if($correct && (in_array($post_captcha->type, array(2, 4, 5))))
{

			$post_captcha->build_recaptcha();

if($post_captcha->html)

			$post_captcha->build_recaptcha();

if($post_captcha->html)

Zeile 1401Zeile 1394
		$bgcolor = "trow2";
}
else

		$bgcolor = "trow2";
}
else

	{

	{

		$bgcolor = "trow1";
}


		$bgcolor = "trow1";
}


Zeile 1413Zeile 1406
		{
$mybb->input['modoptions'] = $mybb->get_input('modoptions', MyBB::INPUT_ARRAY);
if(!isset($mybb->input['modoptions']['closethread']))

		{
$mybb->input['modoptions'] = $mybb->get_input('modoptions', MyBB::INPUT_ARRAY);
if(!isset($mybb->input['modoptions']['closethread']))

			{

			{

				$mybb->input['modoptions']['closethread'] = 0;
}
$closed = (int)$mybb->input['modoptions']['closethread'];

				$mybb->input['modoptions']['closethread'] = 0;
}
$closed = (int)$mybb->input['modoptions']['closethread'];

Zeile 1422Zeile 1415
				$mybb->input['modoptions']['stickthread'] = 0;
}
$stuck = (int)$mybb->input['modoptions']['stickthread'];

				$mybb->input['modoptions']['stickthread'] = 0;
}
$stuck = (int)$mybb->input['modoptions']['stickthread'];

		}
else
{

		}
else
{

			$closed = $thread['closed'];
$stuck = $thread['sticky'];
}

if($closed)

			$closed = $thread['closed'];
$stuck = $thread['sticky'];
}

if($closed)

		{

		{

			$closecheck = ' checked="checked"';
}
else
{
$closecheck = '';

			$closecheck = ' checked="checked"';
}
else
{
$closecheck = '';

		}


		}


		if($stuck)

		if($stuck)

		{

		{

			$stickycheck = ' checked="checked"';
}
else
{

			$stickycheck = ' checked="checked"';
}
else
{

			$stickycheck = '';























			$stickycheck = '';
}

$closeoption = '';
if(is_moderator($thread['fid'], "canopenclosethreads"))
{
eval("\$closeoption = \"".$templates->get("newreply_modoptions_close")."\";");
}

$stickoption = '';
if(is_moderator($thread['fid'], "canstickunstickthreads"))
{
eval("\$stickoption = \"".$templates->get("newreply_modoptions_stick")."\";");
}

if(!empty($closeoption) || !empty($stickoption))
{
eval("\$modoptions = \"".$templates->get("newreply_modoptions")."\";");
$bgcolor = "trow1";
}
else
{
$bgcolor = "trow2";

		}

		}


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

 
	}
else
{

	}
else
{