Changeset 1691 in subversion
- Timestamp:
- Aug 28, 2008 2:04:19 PM (5 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 4 edited
-
CHANGELOG (modified) (1 diff)
-
config/main.inc.php.dist (modified) (1 diff)
-
program/lib/imap.inc (modified) (2 diffs)
-
program/steps/mail/func.inc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r1687 r1691 1 1 CHANGELOG RoundCube Webmail 2 2 --------------------------- 3 4 2008/08/28 (alec) 5 ---------- 6 - Added option 'quota_zero_as_unlimited' (#1484604) 3 7 4 8 2008/08/28 (robin) -
trunk/roundcubemail/config/main.inc.php.dist
r1683 r1691 175 175 // protect the default folders from renames, deletes, and subscription changes 176 176 $rcmail_config['protect_default_folders'] = TRUE; 177 178 // if in your system 0 quota means no limit set this option to TRUE 179 $rcmail_config['quota_zero_as_unlimited'] = FALSE; 177 180 178 181 // Set TRUE if deleted messages should not be displayed -
trunk/roundcubemail/program/lib/imap.inc
r1682 r1691 64 64 - code cleanup and identation fixes 65 65 - removed flush() calls in iil_C_HandlePartBody() to prevent from memory leak (#1485187) 66 - don't return "??" from iil_C_GetQuota() 66 67 67 68 ********************************************************/ … … 2622 2623 $storage_part = array_search('STORAGE', $parts); 2623 2624 if ($storage_part > 0) { 2624 $result = array(); 2625 $used = $parts[$storage_part+1]; 2626 $total = $parts[$storage_part+2]; 2627 2628 $result['used'] = $used; 2629 $result['total'] = (empty($total)?"??":$total); 2630 $result['percent'] = (empty($total)?"??":round(($used/$total)*100)); 2625 $result['used'] = intval($parts[$storage_part+1]); 2626 $result['total'] = intval($parts[$storage_part+2]); 2627 $result['percent'] = min(100, round(($result['used']/max(1,$result['total']))*100)); 2631 2628 $result['free'] = 100 - $result['percent']; 2632 2629 } -
trunk/roundcubemail/program/steps/mail/func.inc
r1686 r1691 458 458 function rcmail_quota_content($quota=NULL) 459 459 { 460 global $IMAP, $COMM_PATH ;460 global $IMAP, $COMM_PATH, $RCMAIL; 461 461 462 462 $display = isset($_SESSION['quota_display']) ? $_SESSION['quota_display'] : ''; … … 472 472 $quota = $IMAP->get_quota(); 473 473 474 if ($quota )474 if ($quota && !($quota['total']==0 && $RCMAIL->config->get('quota_zero_as_unlimited'))) 475 475 { 476 476 $quota_text = sprintf('%s / %s (%.0f%%)',
Note: See TracChangeset
for help on using the changeset viewer.
