Vergleich editpost.php - 1.2.7 - 1.2.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*

 * $Id: editpost.php 3055 2007-05-13 15:01:15Z Tikitiki $

 * $Id: editpost.php 3596 2008-01-20 08:27:39Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 83Zeile 83
}

if($mybb->input['action'] == "deletepost" && $mybb->request_method == "post")

}

if($mybb->input['action'] == "deletepost" && $mybb->request_method == "post")

{

{	

	if(is_moderator($fid, "candeleteposts") != "yes")

	if(is_moderator($fid, "candeleteposts") != "yes")

	{
if($thread['closed'] == "yes")





	{
if($thread['closed'] == "yes")
{
error($lang->redirect_threadclosed);
}
if($forumpermissions['candeleteposts'] == "no")

		{

		{

			error($lang->redirect_threadclosed);
}
if($forumpermissions['candeleteposts'] == "no")
{
error_no_permission();
}
if($mybb->user['uid'] != $post['uid'])
{
error_no_permission();

			error_no_permission();
}
if($mybb->user['uid'] != $post['uid'])
{
error_no_permission();





		}
}
}
else

		}
}
}
else

{

{	

	if(is_moderator($fid, "caneditposts") != "yes")
{
if($thread['closed'] == "yes")

	if(is_moderator($fid, "caneditposts") != "yes")
{
if($thread['closed'] == "yes")

Zeile 122Zeile 122
		{
$lang->edit_time_limit = sprintf($lang->edit_time_limit, $mybb->settings['edittimelimit']);
error($lang->edit_time_limit);

		{
$lang->edit_time_limit = sprintf($lang->edit_time_limit, $mybb->settings['edittimelimit']);
error($lang->edit_time_limit);

		}
}
}

// Password protected forums
check_forum_password($fid, $forum['password']);


		}
}
}

// Password protected forums
check_forum_password($forum['parentlist']);


if(!$mybb->input['attachmentaid'] && ($mybb->input['newattachment'] || ($mybb->input['action'] == "do_editpost" && $mybb->input['submit'] && $_FILES['attachment'])))
{
// If there's an attachment, check it and upload it
if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != "no")

if(!$mybb->input['attachmentaid'] && ($mybb->input['newattachment'] || ($mybb->input['action'] == "do_editpost" && $mybb->input['submit'] && $_FILES['attachment'])))
{
// If there's an attachment, check it and upload it
if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != "no")

	{

	{

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

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

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

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

	}
}


	}
}


Zeile 165Zeile 165
		$db->update_query(TABLE_PREFIX."attachments", $update_sql, "aid='{$mybb->input['attachmentaid']}'");
}
if(!$mybb->input['submit'])

		$db->update_query(TABLE_PREFIX."attachments", $update_sql, "aid='{$mybb->input['attachmentaid']}'");
}
if(!$mybb->input['submit'])

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


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


if($mybb->input['action'] == "deletepost" && $mybb->request_method == "post")
{

if($mybb->input['action'] == "deletepost" && $mybb->request_method == "post")
{

 
	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	$plugins->run_hooks("editpost_deletepost");

if($mybb->input['delete'] == "yes")

	$plugins->run_hooks("editpost_deletepost");

if($mybb->input['delete'] == "yes")

Zeile 236Zeile 239

if($mybb->input['action'] == "do_editpost" && $mybb->request_method == "post")
{


if($mybb->input['action'] == "do_editpost" && $mybb->request_method == "post")
{





	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	$plugins->run_hooks("editpost_do_editpost_start");

// Set up posthandler.

	$plugins->run_hooks("editpost_do_editpost_start");

// Set up posthandler.

Zeile 423Zeile 428
			"pid" => $mybb->input['pid'],
"subject" => $mybb->input['subject'],
"icon" => $mybb->input['icon'],

			"pid" => $mybb->input['pid'],
"subject" => $mybb->input['subject'],
"icon" => $mybb->input['icon'],

			"uid" => $mybb->user['uid'],
"username" => $mybb->user['username'],

			"uid" => $post['uid'],


			"edit_uid" => $mybb->user['uid'],
"message" => $mybb->input['message'],
);

			"edit_uid" => $mybb->user['uid'],
"message" => $mybb->input['message'],
);

	








if(!$mybb->input['previewpost'])
{
$post['uid'] = $mybb->user['uid'];
$post['username'] = $mybb->user['username'];
}


		// Set up the post options from the input.
$post['options'] = array(
"signature" => $mybb->input['postoptions']['signature'],

		// Set up the post options from the input.
$post['options'] = array(
"signature" => $mybb->input['postoptions']['signature'],

Zeile 475Zeile 485
	{
// Figure out the poster's other information.
$query = $db->query("

	{
// Figure out the poster's other information.
$query = $db->query("

			SELECT u.*, f.*

			SELECT u.*, f.*, p.dateline

			FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)

			FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)

			WHERE u.uid='".$post['uid']."'


			LEFT JOIN ".TABLE_PREFIX."posts p ON (p.uid=u.uid)
WHERE u.uid='{$post['uid']}' AND p.pid='{$pid}'

			LIMIT 1
");
$postinfo = $db->fetch_array($query);

			LIMIT 1
");
$postinfo = $db->fetch_array($query);

Zeile 490Zeile 501
		}

// Set the values of the post info array.

		}

// Set the values of the post info array.

		$postinfo['username'] = $postinfo['username'];

 
		$postinfo['userusername'] = $postinfo['username'];

		$postinfo['userusername'] = $postinfo['username'];

		$postinfo['uid'] = $postinfo['uid'];

 
		$postinfo['message'] = $previewmessage;
$postinfo['subject'] = $subject;
$postinfo['icon'] = $icon;
$postinfo['smilieoff'] = $postoptions['disablesmilies'];

		$postinfo['message'] = $previewmessage;
$postinfo['subject'] = $subject;
$postinfo['icon'] = $icon;
$postinfo['smilieoff'] = $postoptions['disablesmilies'];

		$postinfo['dateline'] = time();

 

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


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