Vergleich editpost.php - 1.2.10 - 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 3478 2007-11-15 04:11:36Z Tikitiki $

 * $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($thread['closed'] == "yes")

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

Zeile 91Zeile 91
			error($lang->redirect_threadclosed);
}
if($forumpermissions['candeleteposts'] == "no")

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

		{
error_no_permission();
}

		{
error_no_permission();
}

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

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

Zeile 101Zeile 101
	}
}
else

	}
}
else

{

{	

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

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

	{

	{

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

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

Zeile 139Zeile 139
	if($attachedfile['error'])
{
eval("\$attacherror = \"".$templates->get("error_attacherror")."\";");

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

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

		$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")

	if($mybb->input['attachmentact'] == "remove" && $mybb->input['posthash'])

	{
remove_attachment($pid, $mybb->input['posthash'], $mybb->input['attachmentaid']);
}

	{
remove_attachment($pid, $mybb->input['posthash'], $mybb->input['attachmentaid']);
}

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

	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 196Zeile 199
				mark_reports($tid, "thread");
log_moderator_action($modlogdata, "Deleted Thread");
redirect("forumdisplay.php?fid=$fid", $lang->redirect_threaddeleted);

				mark_reports($tid, "thread");
log_moderator_action($modlogdata, "Deleted Thread");
redirect("forumdisplay.php?fid=$fid", $lang->redirect_threaddeleted);

			}
else
{
error_no_permission();

			}
else
{
error_no_permission();

			}
}
else

			}
}
else

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.