From 65ea2ecf27418feaf7681a02d74168d0d82626fb Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Thu, 13 Sep 2012 12:28:26 -0400
Subject: [PATCH] Fixed/Implemented: replaced intval() by $app->functions->intval() in all interface functions due to big number problem in intval()

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

diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php
index fa4413a..2e2fdfa 100644
--- a/interface/lib/classes/functions.inc.php
+++ b/interface/lib/classes/functions.inc.php
@@ -299,7 +299,15 @@
 		return $result_array;
 	}
 
-	
+    public function intval($string, $force_numeric = false) {
+        if(intval($string) == 2147483647) {
+            if($force_numeric == true) return floatval($string);
+            elseif(preg_match('/^([-]?)[0]*([1-9][0-9]*)([^0-9].*)*$/', $string, $match)) return $match[1].$match[2];
+            else return 0;
+        } else {
+            return intval($string);
+        }
+    }
 		
 }
 

--
Gitblit v1.9.1