From 960e4fb3cae7615526b9d401187679222707a25b Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 30 Mar 2005 23:06:15 +0000 Subject: [PATCH] Removed iff() from use in ISSO. Placed notice on the function to state that it's being deprecated. --- functions.php | 2 +- kernel.php | 5 ++++- template.php | 19 ++++++++++++++----- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/functions.php b/functions.php index 0cd6abe..1d86daa 100644 --- a/functions.php +++ b/functions.php @@ -80,7 +80,7 @@ class Functions { static $count; - $this->bgcolour = iff($count % 2, $class1, $class2); + $this->bgcolour = ($count % 2) ? $class1 : $class2; $count++; } diff --git a/kernel.php b/kernel.php index 315f162..233c735 100644 --- a/kernel.php +++ b/kernel.php @@ -480,7 +480,10 @@ class Shared_Object_Framework $_isso = new Shared_Object_Framework(); /** -* Wrapper for ternary operator that has to be in the global scope +* Wrapper for ternary operator that has to be in the global scope. +* This function is going to be removed from our applications due +* to it's latency in processing. This will remain here purely +* for legacy reasons. It will be removed when necessary. * * @param expr Expression * @param mixed If the expression is true diff --git a/template.php b/template.php index 57d2ab7..1da7bfd 100644 --- a/template.php +++ b/template.php @@ -70,7 +70,7 @@ class DB_Template } else { - $templates = $_isso->db->query("SELECT * FROM " . $this->tablename . " WHERE " . $this->namecolumn . " IN ('" . implode("', '", $namearray) . "')" . iff($this->extrawhere, $this->extrawhere)); + $templates = $_isso->db->query("SELECT * FROM " . $this->tablename . " WHERE " . $this->namecolumn . " IN ('" . implode("', '", $namearray) . "')" . (($this->extrawhere) ? $this->extrawhere : '')); while ($template = $_isso->db->fetch_array($templates)) { $template = $this->_parse($template); @@ -241,7 +241,7 @@ class DB_Template $debug .= "\n\t
  • Source Control: $scinfo
  • "; // query information - $debug .= "\n\t
  • Total Queries: " . sizeof($_isso->db->history) . " (sanitize($_SERVER['REQUEST_URI']) . iff(strpos($_SERVER['REQUEST_URI'], '?') !== false, '&query=1', '?query=1') . "\">?)
  • "; + $debug .= "\n\t
  • Total Queries: " . sizeof($_isso->db->history) . " (sanitize($_SERVER['REQUEST_URI']) . ((strpos($_SERVER['REQUEST_URI'], '?') !== false) ? '&query=1' : '?query=1') . "\">?)
  • "; // debug notices $debug .= "\n\t
  • \n\t\t