From 7f0ceb703ad9f34478134cf4ef8d49713f47f72e Mon Sep 17 00:00:00 2001 From: mohrt Date: Wed, 19 Feb 2003 17:26:48 +0000 Subject: [PATCH] update imbedded vars, allow special $smarty vars --- NEWS | 2 +- Smarty_Compiler.class.php | 2 +- libs/Smarty_Compiler.class.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 1804a9bb..a260f12c 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ - add support for appending key=>value vars (messju, Monte) - change embedded variable logic to only recognize $foo and - $foo[0][bar] syntax (Monte) + $foo[0][bar] and $smarty.foo.bar syntax (Monte) - allow null as function attribute value (André Rabold, Monte) - support $foo->bar[index] syntax (Monte) diff --git a/Smarty_Compiler.class.php b/Smarty_Compiler.class.php index d36ba418..87697428 100644 --- a/Smarty_Compiler.class.php +++ b/Smarty_Compiler.class.php @@ -1446,7 +1446,7 @@ class Smarty_Compiler extends Smarty { function _expand_quoted_text($var_expr) { // if contains unescaped $, expand it - if(preg_match_all('|(?_var_bracket_regexp . ')*|', $var_expr, $match)) { + if(preg_match_all('%(?_var_bracket_regexp . ')*)%', $var_expr, $match)) { rsort($match[0]); reset($match[0]); foreach($match[0] as $var) { diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index d36ba418..87697428 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -1446,7 +1446,7 @@ class Smarty_Compiler extends Smarty { function _expand_quoted_text($var_expr) { // if contains unescaped $, expand it - if(preg_match_all('|(?_var_bracket_regexp . ')*|', $var_expr, $match)) { + if(preg_match_all('%(?_var_bracket_regexp . ')*)%', $var_expr, $match)) { rsort($match[0]); reset($match[0]); foreach($match[0] as $var) {