summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-06-05 13:08:26 +0200
committerAleksander Machniak <alec@alec.pl>2013-06-05 13:08:26 +0200
commit4fee776e51199b51853fa98c42d4d2af0b5330ca (patch)
treec31e841a4422db173de77afd221dc7930a7c50ba /program/include/rcmail.php
parentde15846c54d653d9c1e69dc94c1b3257eb57a5d3 (diff)
Small code improvement
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index a7ddb1e2a..0cb4aad15 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -1559,11 +1559,7 @@ class rcmail extends rcube
$quota_result = (array) $quota;
$quota_result['type'] = isset($_SESSION['quota_display']) ? $_SESSION['quota_display'] : '';
- if (!$quota['total'] && $this->config->get('quota_zero_as_unlimited')) {
- $quota_result['title'] = $this->gettext('unlimited');
- $quota_result['percent'] = 0;
- }
- else if ($quota['total']) {
+ if ($quota['total'] > 0) {
if (!isset($quota['percent'])) {
$quota_result['percent'] = min(100, round(($quota['used']/max(1,$quota['total']))*100));
}
@@ -1582,7 +1578,8 @@ class rcmail extends rcube
}
}
else {
- $quota_result['title'] = $this->gettext('unknown');
+ $unlimited = $this->config->get('quota_zero_as_unlimited');
+ $quota_result['title'] = $this->gettext($unlimited ? 'unlimited' : 'unknown');
$quota_result['percent'] = 0;
}