|
|
@ -447,10 +447,10 @@ function rcmail_quota_content($attrib=NULL)
|
|
|
|
$quota = $RCMAIL->imap->get_quota();
|
|
|
|
$quota = $RCMAIL->imap->get_quota();
|
|
|
|
$quota = $RCMAIL->plugins->exec_hook('quota', $quota);
|
|
|
|
$quota = $RCMAIL->plugins->exec_hook('quota', $quota);
|
|
|
|
|
|
|
|
|
|
|
|
if (!isset($quota['used']) || !isset($quota['total']))
|
|
|
|
if (!$quota['total'] && $RCMAIL->config->get('quota_zero_as_unlimited'))
|
|
|
|
return rcube_label('unknown');
|
|
|
|
return rcube_label('unlimited');
|
|
|
|
|
|
|
|
|
|
|
|
if (!($quota['total']==0 && $RCMAIL->config->get('quota_zero_as_unlimited')))
|
|
|
|
if ($quota['total'])
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!isset($quota['percent']))
|
|
|
|
if (!isset($quota['percent']))
|
|
|
|
$quota['percent'] = min(100, round(($quota['used']/max(1,$quota['total']))*100));
|
|
|
|
$quota['percent'] = min(100, round(($quota['used']/max(1,$quota['total']))*100));
|
|
|
@ -470,13 +470,13 @@ function rcmail_quota_content($attrib=NULL)
|
|
|
|
if ($attrib['height'])
|
|
|
|
if ($attrib['height'])
|
|
|
|
$quota_result['height'] = $attrib['height'];
|
|
|
|
$quota_result['height'] = $attrib['height'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return rcube_label('unlimited');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $quota_result;
|
|
|
|
return $quota_result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return rcube_label('unknown');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function rcmail_get_messagecount_text($count=NULL, $page=NULL)
|
|
|
|
function rcmail_get_messagecount_text($count=NULL, $page=NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|