Vergleich newthread.php - 1.8.38 - 1.8.39

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 105Zeile 105
		$smilieinserter = build_clickable_smilies();
}
}

		$smilieinserter = build_clickable_smilies();
}
}

 

$posticons = '';


// Does this forum allow post icons? If so, fetch the post icons.
if($forum['allowpicons'] != 0)


// Does this forum allow post icons? If so, fetch the post icons.
if($forum['allowpicons'] != 0)

Zeile 135Zeile 137

// If we're not performing a new thread insert and not editing a draft then we're posting a new thread.
if($mybb->input['action'] != "do_newthread" && $mybb->input['action'] != "editdraft")


// If we're not performing a new thread insert and not editing a draft then we're posting a new thread.
if($mybb->input['action'] != "do_newthread" && $mybb->input['action'] != "editdraft")

{
$mybb->input['action'] = "newthread";
}


{
$mybb->input['action'] = "newthread";
}


// Previewing a post, overwrite the action to the new thread action.
if(!empty($mybb->input['previewpost']))

// Previewing a post, overwrite the action to the new thread action.
if(!empty($mybb->input['previewpost']))

{

{

	$mybb->input['action'] = "newthread";

	$mybb->input['action'] = "newthread";

}

}


// Setup a unique posthash for attachment management
if(!$mybb->get_input('posthash') && !$pid)
{
$mybb->input['posthash'] = md5($mybb->user['uid'].random_str());


// Setup a unique posthash for attachment management
if(!$mybb->get_input('posthash') && !$pid)
{
$mybb->input['posthash'] = md5($mybb->user['uid'].random_str());

}


}


if((empty($_POST) && empty($_FILES)) && $mybb->get_input('processed', MyBB::INPUT_INT) == 1)

if((empty($_POST) && empty($_FILES)) && $mybb->get_input('processed', MyBB::INPUT_INT) == 1)

{

{

	error($lang->error_empty_post_input);
}

$errors = array();
$maximageserror = $attacherror = '';

	error($lang->error_empty_post_input);
}

$errors = array();
$maximageserror = $attacherror = '';





// Handle attachments if we've got any.

// Handle attachments if we've got any.

if($mybb->settings['enableattachments'] == 1 && ($mybb->get_input('newattachment') || $mybb->get_input('updateattachment') || ((($mybb->input['action'] == "do_newthread" && $mybb->get_input('submit')) || ($mybb->input['action'] == "newthread" && isset($mybb->input['previewpost'])) || isset($mybb->input['savedraft'])) && $_FILES['attachments'])))





if($mybb->settings['enableattachments'] == 1 && 
($mybb->get_input('newattachment') || $mybb->get_input('updateattachment') ||
((($mybb->input['action'] == "do_newthread" && $mybb->get_input('submit')) ||
($mybb->input['action'] == "newthread" && isset($mybb->input['previewpost'])) ||
isset($mybb->input['savedraft'])) && isset($_FILES['attachments']))))

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

if($mybb->input['action'] == "editdraft" || ($mybb->input['tid'] && $mybb->input['pid']))

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

if($mybb->input['action'] == "editdraft" || ($mybb->input['tid'] && $mybb->input['pid']))

	{

	{

		$attachwhere = "pid='{$pid}'";
}
else

		$attachwhere = "pid='{$pid}'";
}
else

Zeile 211Zeile 217
		$mybb->input['action'] = "newthread";
}
}

		$mybb->input['action'] = "newthread";
}
}


detect_attachmentact();


detect_attachmentact();


// Are we removing an attachment from the thread?
if($mybb->settings['enableattachments'] == 1 && $mybb->get_input('attachmentaid', MyBB::INPUT_INT) && $mybb->get_input('attachmentact') == "remove")
{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


// Are we removing an attachment from the thread?
if($mybb->settings['enableattachments'] == 1 && $mybb->get_input('attachmentaid', MyBB::INPUT_INT) && $mybb->get_input('attachmentact') == "remove")
{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));





	remove_attachment($pid, $mybb->get_input('posthash'), $mybb->get_input('attachmentaid', MyBB::INPUT_INT));

if(!$mybb->get_input('submit'))

	remove_attachment($pid, $mybb->get_input('posthash'), $mybb->get_input('attachmentaid', MyBB::INPUT_INT));

if(!$mybb->get_input('submit'))

Zeile 228Zeile 234
	}

if($mybb->get_input('ajax', MyBB::INPUT_INT) == 1)

	}

if($mybb->get_input('ajax', MyBB::INPUT_INT) == 1)

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

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

		$usage = $db->fetch_array($query);

header("Content-type: application/json; charset={$lang->settings['charset']}");

		$usage = $db->fetch_array($query);

header("Content-type: application/json; charset={$lang->settings['charset']}");

Zeile 597Zeile 603
					ORDER BY p.dateline, p.pid
");
while($quoted_post = $db->fetch_array($query))

					ORDER BY p.dateline, p.pid
");
while($quoted_post = $db->fetch_array($query))

				{

				{

					if($quoted_post['userusername'])
{
$quoted_post['username'] = $quoted_post['userusername'];

					if($quoted_post['userusername'])
{
$quoted_post['username'] = $quoted_post['userusername'];

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

			}

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

			}

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


$attach_mod_options = '';
if($attachment['visible'] != 1)


$attach_mod_options = '';
if($attachment['visible'] != 1)

			{

			{

				eval("\$attachments .= \"".$templates->get("post_attachments_attachment_unapproved")."\";");

				eval("\$attachments .= \"".$templates->get("post_attachments_attachment_unapproved")."\";");

			}

			}

			else
{
eval("\$attachments .= \"".$templates->get("post_attachments_attachment")."\";");

			else
{
eval("\$attachments .= \"".$templates->get("post_attachments_attachment")."\";");

Zeile 982Zeile 988
		$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)

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

			$noshowattach = 1;

		}

		}

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

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

Zeile 997Zeile 1003

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

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

		{

		{

			$lang->attach_usage = "";

			$lang->attach_usage = "";

		}

		}


$attach_add_options = '';
if($mybb->settings['maxattachments'] == 0 || ($mybb->settings['maxattachments'] != 0 && $attachcount < $mybb->settings['maxattachments']) && !isset($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']) && !isset($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 1057Zeile 1063

// 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(!$correct)
{

Zeile 1089Zeile 1095
			$captcha = $post_captcha->html;
}
}

			$captcha = $post_captcha->html;
}
}

 

$pollbox = '';


if($forumpermissions['canpostpolls'] != 0)
{


if($forumpermissions['canpostpolls'] != 0)
{