Opened 7 years ago
Closed 7 years ago
#1483993 closed Feature Patches (fixed)
Mailbox Quota Units
| Reported by: | mcrute | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | |
| Component: | User Interface | Version: | 0.1-beta |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I updated the mailbox quota display code so that it uses flexible units (KB, MB & GB) instead of always being fixed on MB. A 1GB mailbox makes much more sense to John Q. Public than a 1024.78MB mailbox.
The patch fixes the total to us MB and GB, it also fixes the used field to display in KB, MB and GB.
From rcube_imap.inc:
/
- Get quota
- added by Nuny */
function get_quota() {
if ($this->get_capability('QUOTA')) {
$result = iil_C_GetQuota($this->conn);
if ($resulttotal?){
if ($total > 1024000) {
$total = $total / 1024000.0;
$tunits = 'GB';
} else {
$total = $total / 1024.0;
$tunits = 'MB';
}
if ($used > 1024000) {
$used = $used / 1024000.0;
$uunits = 'GB';
} elseif ($used > 1024) {
$used = $used / 1024.0;
$uunits = 'MB';
} else {
$uunits = 'KB';
}
return sprintf("%.0f%s / %.0f%s (%.0f%%)", $used, $uunits, $total, $tunits, $resultpercent?);
}
}
return FALSE;
}
Change History (1)
comment:1 Changed 7 years ago by thomasb
- Resolution set to fixed
- Status changed from new to closed

Similar fix in Trunk.