Bernd Wurst commited on 2013-03-04 15:06:51
Zeige 1 geänderte Dateien mit 1 Einfügungen und 1 Löschungen.
| ... | ... |
@@ -176,7 +176,7 @@ function domainselect($selected = NULL, $selectattribute = '') |
| 176 | 176 |
function get_max_mailboxquota($server, $oldquota) {
|
| 177 | 177 |
$uid = (int) $_SESSION['userinfo']['uid']; |
| 178 | 178 |
$server = (int) $server; |
| 179 |
- $result = db_query("SELECT systemquota - (systemquota_used + COALESCE(mailquota,0)) AS free FROM system.v_quota WHERE uid='{$uid}' AND server='{$server}'");
|
|
| 179 |
+ $result = db_query("SELECT systemquota - (COALESCE(systemquota_used,0) + COALESCE(mailquota,0)) AS free FROM system.v_quota WHERE uid='{$uid}' AND server='{$server}'");
|
|
| 180 | 180 |
$item = mysql_fetch_assoc($result); |
| 181 | 181 |
DEBUG("Free space: ".$item['free']." / Really: ".($item['free'] + ($oldquota - config('vmail_basequota'))));
|
| 182 | 182 |
return $item['free'] + ($oldquota - config('vmail_basequota'));
|
| 183 | 183 |