X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/2b099ad2fc3663697e45dd16f4b82341e0267c86..c49d593ff36278c6c64d0a06bd8a0b6a0b4d2270:/quarantine.php diff --git a/quarantine.php b/quarantine.php index 788f78a..dd7fa1a 100644 --- a/quarantine.php +++ b/quarantine.php @@ -14,7 +14,7 @@ echo $util->getFooter(); } - function handleRequest($request, $ids) { + function handleRequest($util, $request, $ids) { global $CFG; $query = array(); @@ -70,7 +70,7 @@ $request = isset($_GET['op']) ? $_GET['op'] : ''; if ($loggedIn && isset($_GET['id'])) { $ids = explode(',', $_GET['id']); - $query = handleRequest($request, $ids); + $query = handleRequest($util, $request, $ids); $success = $DB->update($query); if (! $success) { error("Message not released, contact administrator [$query]"); @@ -83,8 +83,8 @@ $query = array(); $error = array(); foreach ($marked as $mail_id) { - $mail = $DB->getMail($mail_id); - if (is_object($mail) && true == $util->authorized($mail->recipient)) { + $recipient = $DB->getRecipient($mail_id); + if ($recipient && true == $util->authorized($recipient)) { $query[] = "delete from msgs where mail_id = '$mail_id'"; $query[] = "delete from msgrcpt where mail_id = '$mail_id'"; $query[] = "delete from quarantine where mail_id = '$mail_id'";