From 72695f0356210b5ca68d33d09e91c00ed9d6c2b6 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Tue, 12 Feb 2013 04:55:44 -0500 Subject: [PATCH] Merged Revisions 3771-3801 from stable branch. --- interface/web/sites/user_quota_stats.php | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/interface/web/sites/user_quota_stats.php b/interface/web/sites/user_quota_stats.php index 8b88d84..56cc02c 100644 --- a/interface/web/sites/user_quota_stats.php +++ b/interface/web/sites/user_quota_stats.php @@ -44,15 +44,23 @@ $rec['used'] = $monitor_data['user'][$username]['used']; $rec['soft'] = $monitor_data['user'][$username]['soft']; $rec['hard'] = $monitor_data['user'][$username]['hard']; + $rec['files'] = $monitor_data['user'][$username]['files']; - if (!is_numeric($rec['used'])) $rec['used']=$rec['used'][1]; + if (!is_numeric($rec['used'])){ + if ($rec['used'][0] > $rec['used'][1]){ + $rec['used'] = $rec['used'][0]; + } else { + $rec['used'] = $rec['used'][1]; + } + } if (!is_numeric($rec['soft'])) $rec['soft']=$rec['soft'][1]; if (!is_numeric($rec['hard'])) $rec['hard']=$rec['hard'][1]; + if (!is_numeric($rec['files'])) $rec['files']=$rec['files'][1]; if($rec['used'] > 1024) { $rec['used'] = round($rec['used'] / 1024,2).' MB'; } else { - $rec['used'] .= ' KB'; + if ($rec['used'] != '') $rec['used'] .= ' KB'; } if($rec['soft'] > 1024) { @@ -67,6 +75,8 @@ $rec['hard'] .= ' KB'; } + if($rec['soft'] == " KB") $rec['soft'] = $app->lng('unlimited'); + if($rec['hard'] == " KB") $rec['hard'] = $app->lng('unlimited'); /* @@ -86,7 +96,7 @@ $list = new list_action; $list->SQLExtWhere = "type = 'vhost'"; - +$list->SQLOrderBy = 'ORDER BY domain'; $list->onLoad(); -- Gitblit v1.9.1