Vergleich editpost.php - 1.2.8 - 1.2.14

  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 3095 2007-05-27 12:34:29Z CraKteR $

 * $Id: editpost.php 3951 2008-06-25 21:10:59Z 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

// Password protected forums

check_forum_password($fid, $forum['password']);

check_forum_password($forum['parentlist']);


if(!$mybb->input['attachmentaid'] && ($mybb->input['newattachment'] || ($mybb->input['action'] == "do_editpost" && $mybb->input['submit'] && $_FILES['attachment'])))
{


if(!$mybb->input['attachmentaid'] && ($mybb->input['newattachment'] || ($mybb->input['action'] == "do_editpost" && $mybb->input['submit'] && $_FILES['attachment'])))
{

Zeile 137Zeile 137
		$attachedfile = upload_attachment($_FILES['attachment']);
}
if($attachedfile['error'])

		$attachedfile = upload_attachment($_FILES['attachment']);
}
if($attachedfile['error'])

	{

	{

		eval("\$attacherror = \"".$templates->get("error_attacherror")."\";");
$mybb->input['action'] = "editpost";
}

		eval("\$attacherror = \"".$templates->get("error_attacherror")."\";");
$mybb->input['action'] = "editpost";
}

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

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

}


}


if($mybb->input['attachmentaid'] && isset($mybb->input['attachmentact'])) // Lets remove/approve/unapprove the attachment

if($mybb->input['attachmentaid'] && isset($mybb->input['attachmentact']) && $mybb->input['action'] == "do_editpost" && $mybb->request_method == "post") // Lets remove/approve/unapprove the attachment

{ 
$mybb->input['attachmentaid'] = intval($mybb->input['attachmentaid']);

{ 
$mybb->input['attachmentaid'] = intval($mybb->input['attachmentaid']);

	if($mybb->input['attachmentact'] == "remove")
{
remove_attachment($pid, $mybb->input['posthash'], $mybb->input['attachmentaid']);
}
elseif($mybb->input['attachmentact'] == "approve")
{

	if($mybb->input['attachmentact'] == "remove" && $mybb->input['posthash'])
{
remove_attachment($pid, $mybb->input['posthash'], $mybb->input['attachmentaid']);
}
elseif($mybb->input['attachmentact'] == "approve" && is_moderator($fid, 'caneditposts') == 'yes')
{

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

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

	elseif($mybb->input['attachmentact'] == "unapprove")

	elseif($mybb->input['attachmentact'] == "unapprove" && is_moderator($fid, 'caneditposts') == 'yes')

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

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

Zeile 172Zeile 172

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 215Zeile 218
				if($next_post['pid'])
{
$redir = "showthread.php?tid={$tid}&pid={$next_post['pid']}#pid{$next_post['pid']}";

				if($next_post['pid'])
{
$redir = "showthread.php?tid={$tid}&pid={$next_post['pid']}#pid{$next_post['pid']}";

				}

				}

				else
{
$redir = "showthread.php?tid={$tid}";
}
redirect($redir, $lang->redirect_postdeleted);

				else
{
$redir = "showthread.php?tid={$tid}";
}
redirect($redir, $lang->redirect_postdeleted);

			}

			}

			else
{
error_no_permission();

			else
{
error_no_permission();

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'],