X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/4e417241d6fd22ee7cefdf179d9e9a5d5ed49e5e..0da9e6e7d82b2cb758626d1ee4eb6b3297d667b1:/quarantine.php diff --git a/quarantine.php b/quarantine.php index 7bda56d..6a2cf5a 100644 --- a/quarantine.php +++ b/quarantine.php @@ -55,6 +55,7 @@ $query[] = "UPDATE msgrcpt SET rs = 'R' WHERE mail_id = '$mail_id'"; } else if ($request == 'delete') { $query[] = "UPDATE msgrcpt SET rs = 'D' WHERE mail_id = '$mail_id'"; + } else if ($request == 'block') { } else { error("Unknown operation [$request]"); exit; @@ -70,11 +71,15 @@ $request = isset($_GET['op']) ? $_GET['op'] : ''; if ($loggedIn && isset($_GET['id'])) { $ids = explode(',', $_GET['id']); - $query = handleRequest($util, $request, $ids); - $success = $DB->update($query); - if (! $success) { - error("Message not released, contact administrator [$query]"); - exit; + if ($request == 'block') { + // call rest server + } else { + $query = handleRequest($util, $request, $ids); + $success = $DB->update($query); + if (! $success) { + error("Message not released, contact administrator [$query]"); + exit; + } } header('Location: index.php'); } else if ($loggedIn && $request == 'purge') { @@ -83,8 +88,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'";