mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
readded default_modifiers. who removed that?
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,3 +1,4 @@
|
||||
- reactivate $smarty->default_modifiers (messju)
|
||||
- add cookie persistance to debug console (Monte)
|
||||
- allow single-digit days and months without smarty_make_timestamp()
|
||||
in html_select_date (messju)
|
||||
|
@@ -1534,14 +1534,16 @@ class Smarty_Compiler extends Smarty {
|
||||
$val = trim($val);
|
||||
|
||||
if(preg_match('!^(' . $this->_obj_call_regexp . '|' . $this->_dvar_regexp . ')(' . $this->_mod_regexp . '*)$!', $val, $match)) {
|
||||
// $ variable or object
|
||||
$return = $this->_parse_var($match[1]);
|
||||
if($match[2] != '') {
|
||||
$this->_parse_modifiers($return, $match[2]);
|
||||
}
|
||||
return $return;
|
||||
// $ variable or object
|
||||
$return = $this->_parse_var($match[1]);
|
||||
$modifiers = $match[2];
|
||||
if (!empty($this->default_modifiers) && !preg_match('!(^|\|)smarty:nodefaults($|\|)!',$modifiers)) {
|
||||
$_default_mod_string = implode('|',(array)$this->default_modifiers);
|
||||
$modifiers = empty($modifiers) ? $_default_mod_string : $_default_mod_string . '|' . $modifiers;
|
||||
}
|
||||
elseif(preg_match('!^' . $this->_db_qstr_regexp . '(?:' . $this->_mod_regexp . '*)$!', $val)) {
|
||||
$this->_parse_modifiers($return, $modifiers);
|
||||
return $return;
|
||||
} elseif (preg_match('!^' . $this->_db_qstr_regexp . '(?:' . $this->_mod_regexp . '*)$!', $val)) {
|
||||
// double quoted text
|
||||
preg_match('!^(' . $this->_db_qstr_regexp . ')('. $this->_mod_regexp . '*)$!', $val, $match);
|
||||
$return = $this->_expand_quoted_text($match[1]);
|
||||
|
Reference in New Issue
Block a user