Skip to content

Commit 3319b45

Browse files
author
Florian Schaal
committed
changed hard-coded conversion to formatBytes for mail-user-quota stats
1 parent 5561eb8 commit 3319b45

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

interface/web/mail/user_quota_stats.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
//* Check permissions for module
1616
$app->auth->check_module_permissions('mail');
1717

18+
$app->uses('functions');
19+
1820
$app->load('listform_actions');
1921

2022
// $tmp_rec = $app->db->queryOneRecord("SELECT data from monitor_data WHERE type = 'harddisk_quota' ORDER BY created DESC");
@@ -63,11 +65,15 @@ function prepareDataRow($rec)
6365

6466

6567
$rec['used_sort'] = $rec['used'];
68+
/*
6669
if($rec['used'] < 1544000) {
6770
$rec['used'] = round($rec['used'] / 1024, 4).' KB';
6871
} else {
6972
$rec['used'] = round($rec['used'] / 1048576, 4).' MB';
7073
}
74+
*/
75+
$rec['used']=$app->functions->formatBytes($rec['used']);
76+
if ($rec['used'] == 'NAN') $rec['used']='0 KB';
7177

7278
//* The variable "id" contains always the index variable
7379
$rec['id'] = $rec[$this->idx_key];

0 commit comments

Comments
 (0)