Vergleich newreply.php - 1.04 - 1.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 83Zeile 83
	}
elseif($mybb->input['previewpost'])
{

	}
elseif($mybb->input['previewpost'])
{

		$username = $mybb->input['username'];

		$username = htmlspecialchars_uni($mybb->input['username']);

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

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

Zeile 109Zeile 109
{
// If there's an attachment, check it and upload it
if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != "no")

{
// If there's an attachment, check it and upload it
if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != "no")

	{

	{

		require_once "./inc/functions_upload.php";
$attachedfile = upload_attachment($_FILES['attachment']);
}
if($attachedfile['error'])
{
eval("\$attacherror = \"".$templates->get("error_attacherror")."\";");

		require_once "./inc/functions_upload.php";
$attachedfile = upload_attachment($_FILES['attachment']);
}
if($attachedfile['error'])
{
eval("\$attacherror = \"".$templates->get("error_attacherror")."\";");

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

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

if($mybb->input['removeattachment'])
{ // Lets remove the attachment
require_once "./inc/functions_upload.php";

if($mybb->input['removeattachment'])
{ // Lets remove the attachment
require_once "./inc/functions_upload.php";

Zeile 135Zeile 135

// Max images check
if($mybb->input['action'] == "do_newreply" && !$mybb->input['savedraft'])


// Max images check
if($mybb->input['action'] == "do_newreply" && !$mybb->input['savedraft'])

{

{

	if($mybb->settings['maxpostimages'] != 0 && $mybb->usergroup['cancp'] != "yes")
{
if($postoptions['disablesmilies'] == "yes")

	if($mybb->settings['maxpostimages'] != 0 && $mybb->usergroup['cancp'] != "yes")
{
if($postoptions['disablesmilies'] == "yes")

		{

		{

			$allowsmilies = "no";
}
else
{
$allowsmilies = $forum['allowsmilies'];

			$allowsmilies = "no";
}
else
{
$allowsmilies = $forum['allowsmilies'];

		}

		}

		$imagecheck = postify($mybb->input['message'], $forum['allowhtml'], $forum['allowmycode'], $allowsmilies, $forum['allowimgcode']);
if(substr_count($imagecheck, "<img") > $mybb->settings['maxpostimages'])
{

		$imagecheck = postify($mybb->input['message'], $forum['allowhtml'], $forum['allowmycode'], $allowsmilies, $forum['allowimgcode']);
if(substr_count($imagecheck, "<img") > $mybb->settings['maxpostimages'])
{

Zeile 161Zeile 161
	mt_srand ((double) microtime() * 1000000);
$mybb->input['posthash'] = md5($thread['tid'].$mybb->user['uid'].mt_rand());
}

	mt_srand ((double) microtime() * 1000000);
$mybb->input['posthash'] = md5($thread['tid'].$mybb->user['uid'].mt_rand());
}





if($mybb->input['action'] == "newreply" || $mybb->input['action'] == "editdraft")
{
$plugins->run_hooks("newreply_start");

if($mybb->input['action'] == "newreply" || $mybb->input['action'] == "editdraft")
{
$plugins->run_hooks("newreply_start");

Zeile 180Zeile 180
		else
{
$message = "[quote]\n$quoted[message]\n[/quote]";

		else
{
$message = "[quote]\n$quoted[message]\n[/quote]";

		}
}
if(!$pid && !$mybb->input['previewpost'])
{
$subject = "RE: " . $thread['subject'];
}
if($mybb->input['previewpost'])

		}
}

if($mybb->input['previewpost'])




	{
$previewmessage = $mybb->input['message'];
}

	{
$previewmessage = $mybb->input['message'];
}

Zeile 238Zeile 235
		if($mybb->user['emailnotify'] == "yes")
{
$postoptionschecked['emailnotify'] = "checked";

		if($mybb->user['emailnotify'] == "yes")
{
$postoptionschecked['emailnotify'] = "checked";

		}

		}

	}
if($forum['allowpicons'] != "no")
{

	}
if($forum['allowpicons'] != "no")
{

Zeile 260Zeile 257
		$post = $db->fetch_array($query);
if(!$mybb->user['uid'] || !$post['username'])
{

		$post = $db->fetch_array($query);
if(!$mybb->user['uid'] || !$post['username'])
{

			$post['username'] = $mybb->input['username'];

			$post['username'] = htmlspecialchars_uni($mybb->input['username']);

		}
else
{

		}
else
{

Zeile 291Zeile 288
		eval("\$preview = \"".$templates->get("previewpost")."\";");
}
$subject = htmlspecialchars_uni($subject);

		eval("\$preview = \"".$templates->get("previewpost")."\";");
}
$subject = htmlspecialchars_uni($subject);

 
	if(!$pid && !$mybb->input['previewpost'])
{
$subject = "RE: " . $thread['subject'];
}


// Setup a unique posthash for attachment management
$posthash = $mybb->input['posthash'];


// Setup a unique posthash for attachment management
$posthash = $mybb->input['posthash'];

Zeile 717Zeile 718
	// Setup the correct ownership of the attachments
if($mybb->input['posthash'])
{

	// Setup the correct ownership of the attachments
if($mybb->input['posthash'])
{

		$db->query("UPDATE ".TABLE_PREFIX."attachments SET pid='$pid' WHERE posthash='".$mybb->input['posthash']."'");

		$db->query("UPDATE ".TABLE_PREFIX."attachments SET pid='$pid' WHERE posthash='".addslashes($mybb->input['posthash'])."'");

	}
redirect($url, $lang->redirect_newreply);
}

	}
redirect($url, $lang->redirect_newreply);
}