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/client_templates.inc.php |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/interface/lib/classes/client_templates.inc.php b/interface/lib/classes/client_templates.inc.php
index 7c86fcf..3acc2df 100644
--- a/interface/lib/classes/client_templates.inc.php
+++ b/interface/lib/classes/client_templates.inc.php
@@ -15,7 +15,7 @@
         /*
          * Get the master-template for the client
          */
-        $sql = "SELECT template_master, template_additional FROM client WHERE client_id = " . intval($clientId);
+        $sql = "SELECT template_master, template_additional FROM client WHERE client_id = " . $app->functions->intval($clientId);
         $record = $app->db->queryOneRecord($sql);
         $masterTemplateId = $record['template_master'];
         $additionalTemplateStr = $record['template_additional'];
@@ -24,7 +24,7 @@
          * if the master-Template is custom there is NO changing
          */
         if ($masterTemplateId > 0){
-            $sql = "SELECT * FROM client_template WHERE template_id = " . intval($masterTemplateId);
+            $sql = "SELECT * FROM client_template WHERE template_id = " . $app->functions->intval($masterTemplateId);
             $limits = $app->db->queryOneRecord($sql);
         } else {
             // if there is no master template it makes NO SENSE adding sub templates.
@@ -40,7 +40,7 @@
         $addTpl = explode('/', $additionalTemplateStr);
         foreach ($addTpl as $item){
             if (trim($item) != ''){
-                $sql = "SELECT * FROM client_template WHERE template_id = " . intval($item);
+                $sql = "SELECT * FROM client_template WHERE template_id = " . $app->functions->intval($item);
                 $addLimits = $app->db->queryOneRecord($sql);
                 /* maybe the template is deleted in the meantime */
                 if (is_array($addLimits)){
@@ -115,7 +115,7 @@
             }
         }
         if($update != '') {
-            $sql = 'UPDATE client SET ' . $update . " WHERE client_id = " . intval($clientId);
+            $sql = 'UPDATE client SET ' . $update . " WHERE client_id = " . $app->functions->intval($clientId);
             $app->db->query($sql);
         }
     }

--
Gitblit v1.9.1