fixed handling of methods arguments.

thanks to Manfred Wischin for finding this one and providing the
conceptual fix.
This commit is contained in:
messju
2004-07-27 17:59:35 +00:00
parent 5fe17ceecb
commit 15435172b7
2 changed files with 7 additions and 5 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- fix handling of methods arguments (messju, Manfred Wischin)
- remove touch() call that made the compiled-template's timestamp the - remove touch() call that made the compiled-template's timestamp the
same as the source-template's one. (messju) same as the source-template's one. (messju)
- add assign attribute to html_checkboxes and html_radios - add assign attribute to html_checkboxes and html_radios

View File

@@ -1811,12 +1811,13 @@ class Smarty_Compiler extends Smarty {
function _parse_parenth_args($parenth_args) function _parse_parenth_args($parenth_args)
{ {
preg_match_all('!' . $this->_param_regexp . '!',$parenth_args, $match); preg_match_all('!' . $this->_param_regexp . '!',$parenth_args, $match);
$match = $match[0]; $orig_vals = $match = $match[0];
rsort($match);
reset($match);
$orig_vals = $match;
$this->_parse_vars_props($match); $this->_parse_vars_props($match);
return str_replace($orig_vals, $match, $parenth_args); $replace = array();
for ($i = 0, $count = count($match); $i < $count; $i++) {
$replace[$orig_vals[$i]] = $match[$i];
}
return strtr($parenth_args, $replace);
} }
/** /**