From 8f6fc55f0ed0b066cbded834a0a728ab847b50be Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 6 May 2012 23:19:25 +0200 Subject: [PATCH] Fixed operators in Templater If statements --- frontend/cphp/class.templater.php | 9 +++++---- frontend/rewrite.php | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/cphp/class.templater.php b/frontend/cphp/class.templater.php index b3d816d..fd69fe6 100644 --- a/frontend/cphp/class.templater.php +++ b/frontend/cphp/class.templater.php @@ -186,12 +186,13 @@ class Templater return false; } } + - if($variable == "true") { $variable = true; } - if($variable == "false") { $variable = false; } + if($variable === "true") { $variable = true; } + if($variable === "false") { $variable = false; } if(is_numeric($variable)) { $variable = (int)$variable; } - if($value == "true") { $value = true; } - if($value == "false") { $value = false; } + if($value === "true") { $value = true; } + if($value === "false") { $value = false; } if(is_numeric($value)) { $value = (int)$value; } switch($operator) diff --git a/frontend/rewrite.php b/frontend/rewrite.php index aa4ed93..1e1ab7a 100644 --- a/frontend/rewrite.php +++ b/frontend/rewrite.php @@ -16,6 +16,8 @@ require("includes/include.base.php"); $sTemplateParameters = array(); +//$_SESSION['userid'] = 1; + if(!empty($_SESSION['userid'])) { $sUser = new User($_SESSION['userid']);