mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 02:14:26 +02:00
fix default modifier to work with config vars
This commit is contained in:
@@ -1114,8 +1114,6 @@ class Smarty_Compiler extends Smarty {
|
||||
$modifiers = empty($modifiers) ? $_default_mod_string : $_default_mod_string . '|' . $modifiers;
|
||||
}
|
||||
|
||||
$modifiers = str_replace(array('smarty:nodefaults','||'),array('','|'),$modifiers);
|
||||
|
||||
preg_match_all('!\[(?:\$\w+|\w+(\.\w+)?)\]|(->|\.)\$?\w+|^\w+!', $var_ref, $match);
|
||||
$indexes = $match[0];
|
||||
$var_name = array_shift($indexes);
|
||||
@@ -1220,6 +1218,12 @@ class Smarty_Compiler extends Smarty {
|
||||
|
||||
for ($i = 0, $for_max = count($modifiers); $i < $for_max; $i++) {
|
||||
$modifier_name = $modifiers[$i];
|
||||
|
||||
if($modifier_name == 'smarty') {
|
||||
// skip smarty modifier
|
||||
continue;
|
||||
}
|
||||
|
||||
preg_match_all('!:(' . $qstr_regexp . '|[^:]+)!', $modifier_arg_strings[$i], $match);
|
||||
$modifier_args = $match[1];
|
||||
|
||||
|
@@ -1114,8 +1114,6 @@ class Smarty_Compiler extends Smarty {
|
||||
$modifiers = empty($modifiers) ? $_default_mod_string : $_default_mod_string . '|' . $modifiers;
|
||||
}
|
||||
|
||||
$modifiers = str_replace(array('smarty:nodefaults','||'),array('','|'),$modifiers);
|
||||
|
||||
preg_match_all('!\[(?:\$\w+|\w+(\.\w+)?)\]|(->|\.)\$?\w+|^\w+!', $var_ref, $match);
|
||||
$indexes = $match[0];
|
||||
$var_name = array_shift($indexes);
|
||||
@@ -1220,6 +1218,12 @@ class Smarty_Compiler extends Smarty {
|
||||
|
||||
for ($i = 0, $for_max = count($modifiers); $i < $for_max; $i++) {
|
||||
$modifier_name = $modifiers[$i];
|
||||
|
||||
if($modifier_name == 'smarty') {
|
||||
// skip smarty modifier
|
||||
continue;
|
||||
}
|
||||
|
||||
preg_match_all('!:(' . $qstr_regexp . '|[^:]+)!', $modifier_arg_strings[$i], $match);
|
||||
$modifier_args = $match[1];
|
||||
|
||||
|
Reference in New Issue
Block a user