Zeile 6 | Zeile 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 3596 2008-01-20 08:27:39Z Tikitiki $
| * $Id: editpost.php 3951 2008-06-25 21:10:59Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 147 | Zeile 147 |
---|
} }
|
} }
|
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']}'");
|