From 50d490fca5c3d992996f4bca22b2f5159011c043 Mon Sep 17 00:00:00 2001 From: messju Date: Fri, 22 Aug 2003 16:15:47 +0000 Subject: [PATCH] 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. --- NEWS | 2 ++ libs/core/core.assemble_plugin_filepath.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index e2916703..18cdf59e 100644 --- a/NEWS +++ b/NEWS @@ -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) diff --git a/libs/core/core.assemble_plugin_filepath.php b/libs/core/core.assemble_plugin_filepath.php index 639c1c3e..65204cc7 100644 --- a/libs/core/core.assemble_plugin_filepath.php +++ b/libs/core/core.assemble_plugin_filepath.php @@ -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; } }