changes on Smarty side breaks all prefilter in Piwigo

It would be better to modify the way template.class.php registers prefilters
but I didn't find the appropriate data structure.
This commit is contained in:
plegall 2015-12-20 14:54:07 +01:00
parent d33051cb72
commit 968e9ff06d

View file

@ -60,7 +60,11 @@ class Smarty_Internal_Runtime_FilterHandler
// loop over registered filters of specified type
if (!empty($template->smarty->registered_filters[$type])) {
foreach ($template->smarty->registered_filters[$type] as $key => $name) {
$content = call_user_func($template->smarty->registered_filters[$type][$key], $content, $template);
if (is_array($template->smarty->registered_filters[$type][$key])) {
$content = call_user_func($template->smarty->registered_filters[$type][$key], $content, $template);
} else {
$content = $template->smarty->registered_filters[$type][$key]($content, $template);
}
}
}
// return filtered output