mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
update imbedded vars, allow special $smarty vars
This commit is contained in:
2
NEWS
2
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<64> Rabold, Monte)
|
||||
- support $foo->bar[index] syntax (Monte)
|
||||
|
@@ -1446,7 +1446,7 @@ class Smarty_Compiler extends Smarty {
|
||||
function _expand_quoted_text($var_expr)
|
||||
{
|
||||
// if contains unescaped $, expand it
|
||||
if(preg_match_all('|(?<!\\\\)\$\w+(?:' . $this->_var_bracket_regexp . ')*|', $var_expr, $match)) {
|
||||
if(preg_match_all('%(?<!\\\\)\$(?:smarty(?:\.\w+)+|\w+(?:' . $this->_var_bracket_regexp . ')*)%', $var_expr, $match)) {
|
||||
rsort($match[0]);
|
||||
reset($match[0]);
|
||||
foreach($match[0] as $var) {
|
||||
|
@@ -1446,7 +1446,7 @@ class Smarty_Compiler extends Smarty {
|
||||
function _expand_quoted_text($var_expr)
|
||||
{
|
||||
// if contains unescaped $, expand it
|
||||
if(preg_match_all('|(?<!\\\\)\$\w+(?:' . $this->_var_bracket_regexp . ')*|', $var_expr, $match)) {
|
||||
if(preg_match_all('%(?<!\\\\)\$(?:smarty(?:\.\w+)+|\w+(?:' . $this->_var_bracket_regexp . ')*)%', $var_expr, $match)) {
|
||||
rsort($match[0]);
|
||||
reset($match[0]);
|
||||
foreach($match[0] as $var) {
|
||||
|
Reference in New Issue
Block a user