Incorrect mysql statement

master
Phoenix Eve Aspacio 2017-02-26 16:19:27 +08:00 committed by GitHub
parent 1668a4e871
commit 8151aed338
1 changed files with 3 additions and 2 deletions

View File

@ -1725,6 +1725,7 @@ function get_domain_admins() {
} }
function get_domain_admin_details($domain_admin) { function get_domain_admin_details($domain_admin) {
global $pdo; global $pdo;
global $lang; global $lang;
$domainadmindata = array(); $domainadmindata = array();
if (isset($domain_admin) && $_SESSION['mailcow_cc_role'] != "admin") { if (isset($domain_admin) && $_SESSION['mailcow_cc_role'] != "admin") {
@ -4349,8 +4350,8 @@ function mailbox_get_mailbox_details($mailbox) {
$stmt->execute(array(':domain' => $row['domain'], ':username' => $mailbox)); $stmt->execute(array(':domain' => $row['domain'], ':username' => $mailbox));
$MailboxUsage = $stmt->fetch(PDO::FETCH_ASSOC); $MailboxUsage = $stmt->fetch(PDO::FETCH_ASSOC);
$stmt = $pdo->prepare("SELECT IFNULL(COUNT(`address`), 0) AS `sa_count` FROM `spamalias` WHERE `address` = :address"); $stmt = $pdo->prepare("SELECT IFNULL(COUNT(`address`), 0) AS `sa_count` FROM `spamalias` WHERE `goto` = :address AND `validity` >= :unixnow");
$stmt->execute(array(':address' => $mailbox)); $stmt->execute(array(':address' => $mailbox, ':unixnow' => time()));
$SpamaliasUsage = $stmt->fetch(PDO::FETCH_ASSOC); $SpamaliasUsage = $stmt->fetch(PDO::FETCH_ASSOC);
$mailboxdata['max_new_quota'] = ($DomainQuota['quota'] * 1048576) - $MailboxUsage['in_use']; $mailboxdata['max_new_quota'] = ($DomainQuota['quota'] * 1048576) - $MailboxUsage['in_use'];