Changeset 5b3ed54 in github
- Timestamp:
- Dec 13, 2009 1:28:47 PM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 63ffe33c
- Parents:
- 317a7d9
- Files:
-
- 4 edited
-
CHANGELOG (modified) (1 diff)
-
program/steps/mail/check_recent.inc (modified) (1 diff)
-
program/steps/mail/func.inc (modified) (4 diffs)
-
program/steps/mail/move_del.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
rf96ffde r5b3ed54 2 2 =========================== 3 3 4 - Plugin API: added 'quota' hook 4 5 - Fix parsing conditional comments in HTML messages (#1486350) 5 6 - Use built-in json_encode() for proper JSON format in AJAX replies -
program/steps/mail/check_recent.inc
r00a8338 r5b3ed54 47 47 48 48 if (!empty($_GET['_quota'])) 49 $OUTPUT->command('set_quota', rcmail_quota_content( $IMAP->get_quota()));49 $OUTPUT->command('set_quota', rcmail_quota_content()); 50 50 51 51 // trigger plugin hook -
program/steps/mail/func.inc
r2717f9f r5b3ed54 516 516 $OUTPUT->add_gui_object('quotadisplay', $attrib['id']); 517 517 518 $quota = rcmail_quota_content( NULL,$attrib);518 $quota = rcmail_quota_content($attrib); 519 519 520 520 if (is_array($quota)) { … … 528 528 529 529 530 function rcmail_quota_content($ quota=NULL, $attrib=NULL)531 { 532 global $ IMAP, $COMM_PATH, $RCMAIL;530 function rcmail_quota_content($attrib=NULL) 531 { 532 global $COMM_PATH, $RCMAIL; 533 533 534 534 $display = isset($_SESSION['quota_display']) ? $_SESSION['quota_display'] : ''; 535 535 536 if (empty($quota)) { 537 if (!$IMAP->get_capability('QUOTA')) 538 return rcube_label('unknown'); 539 else 540 $quota = $IMAP->get_quota(); 541 } 542 543 if ($quota && !($quota['total']==0 && $RCMAIL->config->get('quota_zero_as_unlimited'))) 536 $quota = $RCMAIL->imap->get_quota(); 537 $quota = $RCMAIL->plugins->exec_hook('quota', $quota); 538 539 if (!isset($quota['used']) || !isset($quota['total'])) 540 return rcube_label('unknown'); 541 542 if (!($quota['total']==0 && $RCMAIL->config->get('quota_zero_as_unlimited'))) 544 543 { 544 if (!isset($quota['percent'])) 545 $quota['percent'] = min(100, round(($quota['used']/max(1,$quota['total']))*100)); 546 545 547 $quota_result = sprintf('%s / %s (%.0f%%)', 546 548 show_bytes($quota['used'] * 1024), show_bytes($quota['total'] * 1024), … … 548 550 549 551 if ($display == 'image') { 550 $quota_result = array( 552 $quota_result = array( 551 553 'percent' => $quota['percent'], 552 554 'title' => $quota_result, 553 555 ); 556 554 557 if ($attrib['width']) 555 558 $quota_result['width'] = $attrib['width']; … … 734 737 $html = $washer->wash($html); 735 738 $REMOTE_OBJECTS = $washer->extlinks; 736 739 737 740 return $html; 738 741 } -
program/steps/mail/move_del.inc
rcbeea3d r5b3ed54 114 114 } 115 115 116 $OUTPUT->command('set_quota', rcmail_quota_content( $IMAP->get_quota()));116 $OUTPUT->command('set_quota', rcmail_quota_content()); 117 117 $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count)); 118 118
Note: See TracChangeset
for help on using the changeset viewer.
