MailboxHandler:

- read_from_db_postprocess(): avoid warning if quota is disabled in $struct


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1655 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 10 years ago
parent 5abc5d2b38
commit 5fcade96d5

@ -175,8 +175,13 @@ class MailboxHandler extends PFAHandler {
protected function read_from_db_postprocess($db_result) {
foreach ($db_result as $key => $row) {
$db_result[$key]['quotabytes'] = $row['quota'];
$db_result[$key]['quota'] = divide_quota($row['quota']); # convert quota to MB
if (isset($row['quota'])) { # quota could be disabled in $struct
$db_result[$key]['quotabytes'] = $row['quota'];
$db_result[$key]['quota'] = divide_quota($row['quota']); # convert quota to MB
} else {
$db_result[$key]['quotabytes'] = -1;
$db_result[$key]['quota'] = -1;
}
}
return $db_result;
}

Loading…
Cancel
Save