[Web] Important fixes for quarantaine; other minor changes

This commit is contained in:
andre.peters
2018-01-17 15:23:33 +01:00
parent 003e6ef5cd
commit 8419266678
5 changed files with 36 additions and 4 deletions

View File

@@ -216,6 +216,13 @@ function quarantaine($_action, $_data = null) {
$q_meta[] = $row;
}
}
elseif ($_SESSION['mailcow_cc_role'] == "admin") {
$stmt = $pdo->query('SELECT `id`, `qid`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantaine`');
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
while($row = array_shift($rows)) {
$q_meta[] = $row;
}
}
else {
foreach (mailbox('get', 'mailboxes') as $mbox) {
$stmt = $pdo->prepare('SELECT `id`, `qid`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantaine` WHERE `rcpt` = :mbox');