global $db, $mybb, $plugins; $aid = (int)$aid; $posthash = $db->escape_string($posthash);
|
global $db, $mybb, $plugins; $aid = (int)$aid; $posthash = $db->escape_string($posthash);
|
{ $query = $db->simple_select("attachments", "aid, attachname, thumbnail, visible", "aid='{$aid}' AND posthash='{$posthash}'"); $attachment = $db->fetch_array($query);
| { $query = $db->simple_select("attachments", "aid, attachname, thumbnail, visible", "aid='{$aid}' AND posthash='{$posthash}'"); $attachment = $db->fetch_array($query);
|
}
$plugins->run_hooks("remove_attachment_do_delete", $attachment);
|
}
$plugins->run_hooks("remove_attachment_do_delete", $attachment);
|
$db->delete_query("attachments", "aid='{$attachment['aid']}'");
| $db->delete_query("attachments", "aid='{$attachment['aid']}'");
|