fixed bug in traversal of $smarty->plugins_dir-array in

smarty_core_assemble_plugin_filepath(). the first matching plugin in
the path should be used, not the last one.
This commit is contained in:
messju
2003-08-22 16:15:47 +00:00
parent 786d110c89
commit 50d490fca5
2 changed files with 4 additions and 0 deletions

2
NEWS
View File

@@ -1,3 +1,5 @@
- fixed bug in traversal of $smarty->plugins_dir-array. now the
first matching plugin is taken (messju)
- moved {strip} back into the compiler (messju)
- fixed config_load: handling of section-attribute and use of
multiple config-files in one template (atu, messju)

View File

@@ -28,11 +28,13 @@ function smarty_core_assemble_plugin_filepath($params, &$smarty)
// relative path, see if it is in the SMARTY_DIR
if (@is_readable(SMARTY_DIR . $_plugin_filepath)) {
$_return = SMARTY_DIR . $_plugin_filepath;
break;
}
}
// try relative to cwd (or absolute)
if (@is_readable($_plugin_filepath)) {
$_return = $_plugin_filepath;
break;
}
}