Commit 97923c62 authored by domi's avatar domi
Browse files

Avoid divide by zero ; Handle when we are called from adm_login nicely

parent 9d4f8e23
......@@ -3,6 +3,9 @@
require_once("../class/config.php");
if (!defined("QUOTASONE")) return;
if (!isset($mode)) { # when included from adm_login, mode is not set
$mode = 0;
}
?>
<center>
......@@ -69,7 +72,12 @@ if (!defined("QUOTASONE")) return;
}
echo "</td></tr>";
}
$tpc = intval(100 * $domsize / $totalmail);
if ($totalmail) {
$tpc = intval(100 * $domsize / $totalmail);
} else {
$tpc = 0;
}
if (count($alias_sizes) > 0) {
echo "<tr><td><i>". _('Total'). " {$domaine}</i></td><td></td>";
echo "<td";
if ($mode!=2) echo " style=\"text-align: right\"";
......@@ -83,6 +91,7 @@ if (!defined("QUOTASONE")) return;
}
echo "</i></td></tr>";
}
}
?>
</tbody>
</table>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment