Vergleich editpost.php - 1.2.11 - 1.2.12

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

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

		{

		{

			error($lang->redirect_threadclosed);

			error($lang->redirect_threadclosed);

		}

		}

		if($forumpermissions['caneditposts'] == "no")

		if($forumpermissions['caneditposts'] == "no")

		{
error_no_permission();

		{
error_no_permission();

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

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

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

		}

		}

	}
}


	}
}


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";
}
if(!$mybb->input['submit'])

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

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

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

	}

	}

}

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

}

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

	{

	{

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

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

	}

	}

	elseif($mybb->input['attachmentact'] == "approve")
{
$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'] == "approve")
{
$update_sql = array("visible" => 1);
$db->update_query(TABLE_PREFIX."attachments", $update_sql, "aid='{$mybb->input['attachmentaid']}'");
}
elseif($mybb->input['attachmentact'] == "unapprove")

	{

	{

		$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 169Zeile 169
		$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 179Zeile 182
		$query = $db->simple_select(TABLE_PREFIX."posts", "pid", "tid='{$tid}'", array("limit" => 1, "order_by" => "dateline", "order_dir" => "asc"));
$firstcheck = $db->fetch_array($query);
if($firstcheck['pid'] == $pid)

		$query = $db->simple_select(TABLE_PREFIX."posts", "pid", "tid='{$tid}'", array("limit" => 1, "order_by" => "dateline", "order_dir" => "asc"));
$firstcheck = $db->fetch_array($query);
if($firstcheck['pid'] == $pid)

		{

		{

			$firstpost = 1;

			$firstpost = 1;

		}

		}

		else

		else

		{

		{

			$firstpost = 0;
}
$modlogdata['fid'] = $fid;

			$firstpost = 0;
}
$modlogdata['fid'] = $fid;

Zeile 191Zeile 194
		if($firstpost)
{
if($forumpermissions['candeletethreads'] == "yes")

		if($firstpost)
{
if($forumpermissions['candeletethreads'] == "yes")

			{

			{

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

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

			}
else
{

			}
else
{

				error_no_permission();
}
}

				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.