added simple math operators to variables

This commit is contained in:
mohrt
2003-05-02 16:39:18 +00:00
parent ebe4d61475
commit b29b7f9025
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- added simple math operators to variables (Monte)
- reverted patch for case-insensitive tag-names (messju) - reverted patch for case-insensitive tag-names (messju)
- enabled array(&$obj. 'source', 'timestamp', 'secure', 'trusted') - enabled array(&$obj. 'source', 'timestamp', 'secure', 'trusted')
as callback for register_resource() (messju); as callback for register_resource() (messju);

View File

@@ -112,7 +112,7 @@ class Smarty_Compiler extends Smarty {
// $foo[5][blah] // $foo[5][blah]
// $foo[5].bar[$foobar][4] // $foo[5].bar[$foobar][4]
$this->_dvar_guts_regexp = '\w+(?:' . $this->_var_bracket_regexp $this->_dvar_guts_regexp = '\w+(?:' . $this->_var_bracket_regexp
. ')*(?:\.\$?\w+(?:' . $this->_var_bracket_regexp . ')*)*'; . ')*(?:\.\$?\w+(?:' . $this->_var_bracket_regexp . ')*)*(?:\+\+|\-\-|(?:[\+\-\*\/]\d+(?:\.\d+)?))?';
$this->_dvar_regexp = '\$' . $this->_dvar_guts_regexp; $this->_dvar_regexp = '\$' . $this->_dvar_guts_regexp;
// matches config vars: // matches config vars: