From 820e4a545e723976ce3f4ce0e57eef02f9b3cf7d Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Thu, 04 Jul 2013 19:48:42 -0400
Subject: [PATCH] - Added mailbox quota dashlet.

---
 interface/web/mail/user_quota_stats.php |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/interface/web/mail/user_quota_stats.php b/interface/web/mail/user_quota_stats.php
index 5766ff7..4933103 100644
--- a/interface/web/mail/user_quota_stats.php
+++ b/interface/web/mail/user_quota_stats.php
@@ -50,15 +50,18 @@
 		$rec['used'] = isset($monitor_data[$email]['used']) ? $monitor_data[$email]['used'] : array(1 => 0);
 		
 		if (!is_numeric($rec['used'])) $rec['used']=$rec['used'][1];
-
-        $rec['quota'] = round($rec['quota'] / 1048576,2).' MB';
-		if($rec['quota'] == "0 MB") $rec['quota'] = $app->lng('unlimited');
+		
+		if($rec['quota'] == 0){
+			$rec['quota'] = $app->lng('unlimited');
+		} else {
+			$rec['quota'] = round($rec['quota'] / 1048576,4).' MB';
+		}
 
 
         if($rec['used'] < 1544000) {
-            $rec['used'] = round($rec['used'] / 1024,2).' KB';
+            $rec['used'] = round($rec['used'] / 1024,4).' KB';
         } else {
-            $rec['used'] = round($rec['used'] / 1048576,2).' MB';
+            $rec['used'] = round($rec['used'] / 1048576,4).' MB';
         }   
 
 		//* The variable "id" contains always the index variable

--
Gitblit v1.9.1