fix default modifier to work with config vars

This commit is contained in:
mohrt
2002-07-17 21:56:41 +00:00
parent 36e160bb39
commit f07ea419e7
2 changed files with 16 additions and 8 deletions

View File

@@ -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];

View File

@@ -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];