From edaa7c5d66ef52eec1c15f79ae4034fc3e67b9b7 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 25 Oct 2012 10:29:39 -0400
Subject: [PATCH] - Fixed: FS#2502 - Problem in web traffic accounting for large integers - Added intval function from interface functions library to server system library.

---
 server/cron_daily.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/cron_daily.php b/server/cron_daily.php
index 9420a05..dcc84ec 100644
--- a/server/cron_daily.php
+++ b/server/cron_daily.php
@@ -478,7 +478,7 @@
 
 			//* get the traffic
 			$tmp = $app->db->queryOneRecord("SELECT SUM(traffic_bytes) As total_traffic_bytes FROM web_traffic WHERE traffic_date like '$current_month%' AND hostname = '$domain'");
-			$web_traffic = (int)$tmp['total_traffic_bytes']/1024/1024;
+			$web_traffic = round($tmp['total_traffic_bytes']/1024/1024);
 
 			//* Website is over quota, we will disable it
 			/*if( ($web_traffic_quota > 0 && $web_traffic > $web_traffic_quota) ||

--
Gitblit v1.9.1