diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-04-29 11:31:41 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-04-29 11:31:41 +0000 |
| commit | 61147b7b6662192ee3306b5f038fef780d9464d0 (patch) | |
| tree | df2eaa318be504a812047e34c9b3fd1bd88fc14d | |
| parent | 70223e4572af10fa3883d33920417a19a40ed5b7 (diff) | |
- Fix quota_zero_as_unlimited (#1486662)
git-svn-id: https://svn.roundcube.net/trunk@3577 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/CHANGELOG | 1 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 14 |
2 files changed, 8 insertions, 7 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index a8bb672d4..0436be572 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG RoundCube Webmail =========================== +- Fix quota_zero_as_unlimited (#1486662) - Fix folder subscription checking (#1486684) - Fix INBOX appears (sometimes) twice in mailbox list (#1486672) - Fix listing of attachments of some types e.g. "x-epoc/x-sisx-app" (#1486653) diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index ad4ca2257..25b0338af 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -447,10 +447,10 @@ function rcmail_quota_content($attrib=NULL) $quota = $RCMAIL->imap->get_quota(); $quota = $RCMAIL->plugins->exec_hook('quota', $quota); - if (!isset($quota['used']) || !isset($quota['total'])) - return rcube_label('unknown'); + if (!$quota['total'] && $RCMAIL->config->get('quota_zero_as_unlimited')) + return rcube_label('unlimited'); - if (!($quota['total']==0 && $RCMAIL->config->get('quota_zero_as_unlimited'))) + if ($quota['total']) { if (!isset($quota['percent'])) $quota['percent'] = min(100, round(($quota['used']/max(1,$quota['total']))*100)); @@ -463,18 +463,18 @@ function rcmail_quota_content($attrib=NULL) $quota_result = array( 'percent' => $quota['percent'], 'title' => $quota_result, - ); + ); if ($attrib['width']) $quota_result['width'] = $attrib['width']; if ($attrib['height']) $quota_result['height'] = $attrib['height']; } + + return $quota_result; } - else - return rcube_label('unlimited'); - return $quota_result; + return rcube_label('unknown'); } |
