Browse code

Wenn bisher noch gar keine (benutzten) Postfächer da sind, soll die Berechnung der Quota trotzdem funtkionieren

Bernd Wurst authored on18/02/2013 10:09:49
Showing1 changed files
... ...
@@ -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 + mailquota) AS free FROM system.v_quota WHERE uid='{$uid}' AND server='{$server}'");
179
+  $result = db_query("SELECT systemquota - (systemquota_used + 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'));