From 2e9ac915cb0efc7474443d317e317d9875a1feef Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Thu, 08 Jan 2015 12:18:40 -0500
Subject: [PATCH] Merge branch 'master' of http://git.ispconfig.org/ispconfig/ispconfig3

---
 interface/web/dashboard/dashlets/limits.php |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php
index 87898eb..70113f3 100644
--- a/interface/web/dashboard/dashlets/limits.php
+++ b/interface/web/dashboard/dashlets/limits.php
@@ -143,10 +143,15 @@
 			}
 			if($value != 0 || $value == $wb['unlimited_txt']) {
 				$value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value;
+				$usage = $this->_get_limit_usage($limit);
+				$percentage = ($value == '-1' || $value == 0 ? 0 : round(100 * $usage / $value));
 				$rows[] = array('field' => $field,
 					'field_txt' => $wb[$field.'_txt'],
 					'value' => $value_formatted,
-					'usage' => $this->_get_limit_usage($limit));
+					'value_raw' => $value,
+					'usage' => $usage,
+					'usage_raw' => $usage,
+					'percentage' => $percentage);
 			}
 		}
 		$tpl->setLoop('rows', $rows);

--
Gitblit v1.9.1