From d9bcf68e395d6156645a7974b1a992aa6e6c00aa Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Mon, 14 Oct 2013 08:57:25 -0400
Subject: [PATCH] Added missing empty directories from svn import

---
 interface/web/sites/user_quota_stats.php |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/interface/web/sites/user_quota_stats.php b/interface/web/sites/user_quota_stats.php
index 0b23b1a..32aa706 100644
--- a/interface/web/sites/user_quota_stats.php
+++ b/interface/web/sites/user_quota_stats.php
@@ -42,11 +42,18 @@
 		$username = $rec['system_user'];
 		
 		$rec['used'] = $monitor_data['user'][$username]['used'];
+		$rec['used_sort'] = $rec['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];
@@ -54,7 +61,7 @@
 		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) {
@@ -69,6 +76,8 @@
 			$rec['hard'] .= ' KB';
 		}
 		
+		if($rec['soft'] == " KB") $rec['soft'] = $app->lng('unlimited');
+		if($rec['hard'] == " KB") $rec['hard'] = $app->lng('unlimited');
 		
 		
 		/*
@@ -87,8 +96,8 @@
 }
 
 $list = new list_action;
-$list->SQLExtWhere = "type = 'vhost'";
-
+$list->SQLExtWhere = "web_domain.type = 'vhost'";
+$list->SQLOrderBy = 'ORDER BY web_domain.domain';
 $list->onLoad();
 
 

--
Gitblit v1.9.1