From 21c641cb28510fe775b2f11c17744d74e972b018 Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Mon, 21 Oct 2013 10:34:41 -0400
Subject: [PATCH] add database-size monitoring. the results stored in the database may be used to add the db-size to the web-quota, too.

---
 interface/lib/classes/functions.inc.php |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php
index 50b3e6c..5b98c20 100644
--- a/interface/lib/classes/functions.inc.php
+++ b/interface/lib/classes/functions.inc.php
@@ -276,7 +276,13 @@
             return intval($string);
         }
     }
-
+    
+    /**
+    * Function to change bytes to kB, MB, GB or TB
+    * @param int $size - size in bytes
+    * @param int precicion - after-comma-numbers (default: 2)
+    * @return string - formated bytes
+    */
     public function formatBytes($size, $precision = 2) {
         $base=log($size)/log(1024);
         $suffixes=array('','k','M','G','T');

--
Gitblit v1.9.1