From 2ebecbe2e6b58495d38ac69f9ad5f7821d376010 Mon Sep 17 00:00:00 2001 From: mohrt Date: Mon, 24 Feb 2003 16:24:29 +0000 Subject: [PATCH] added << >> <> support to IF statements --- NEWS | 1 + libs/Smarty_Compiler.class.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 62b2693d..8cb91fbe 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - added << >> <> support to if statments (SMK, Monte) - fix _assign_smarty_interface to not overwrite keys other than 'request' (Jerome Poudevigne, Monte) - added html_radios to distribution (Christopher Kvarme, Monte) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 451ab599..8ccc11ed 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -1089,7 +1089,7 @@ class Smarty_Compiler extends Smarty { preg_match_all('/(?> ' . $this->_obj_call_regexp . '(?:' . $this->_mod_regexp . '*)? | # valid object call ' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*)? | # var or quoted string - \-?\d+(?:\.\d+)?|\.\d+|!==|<=>|===|==|!=|<=|>=|\&\&|\|\||\(|\)|,|\!|\^|=|\&|\~|<|>|\||\%|\+|\-|\/|\*|\@ | # valid non-word token + \-?\d+(?:\.\d+)?|\.\d+|!==|===|==|!=|<>|<<|>>|<=|>=|\&\&|\|\||\(|\)|,|\!|\^|=|\&|\~|<|>|\||\%|\+|\-|\/|\*|\@ | # valid non-word token \b\w+\b | # valid word token \S+ # anything else )/x', $tag_args, $match); @@ -1117,6 +1117,9 @@ class Smarty_Compiler extends Smarty { case '>': case '<': case '!=': + case '<>': + case '<<': + case '>>': case '<=': case '>=': case '&&':