Fixed operators in Templater If statements

feature/node-rewrite
Sven Slootweg 13 years ago
parent 1f38aaf361
commit 8f6fc55f0e

@ -187,11 +187,12 @@ class Templater
} }
} }
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(is_numeric($variable)) { $variable = (int)$variable; }
if($value == "true") { $value = true; } if($value === "true") { $value = true; }
if($value == "false") { $value = false; } if($value === "false") { $value = false; }
if(is_numeric($value)) { $value = (int)$value; } if(is_numeric($value)) { $value = (int)$value; }
switch($operator) switch($operator)

@ -16,6 +16,8 @@ require("includes/include.base.php");
$sTemplateParameters = array(); $sTemplateParameters = array();
//$_SESSION['userid'] = 1;
if(!empty($_SESSION['userid'])) if(!empty($_SESSION['userid']))
{ {
$sUser = new User($_SESSION['userid']); $sUser = new User($_SESSION['userid']);

Loading…
Cancel
Save