From b9bae74db6b5f2ab38cf4192c25d93a3f09eba75 Mon Sep 17 00:00:00 2001 From: rodneyrehm Date: Mon, 6 Feb 2012 20:17:32 +0000 Subject: [PATCH] improvement stream_resolve_include_path() added to Smarty_Internal_Get_Include_Path (Forum Topic 20980) --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_get_include_path.php | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/change_log.txt b/change_log.txt index 597b9d1a..6331db4a 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== trunk ===== +06.02.2012 +- improvement stream_resolve_include_path() added to Smarty_Internal_Get_Include_Path (Forum Topic 20980) + 30.01.2012 - bugfix Smarty_Security internal $_resource_dir cache wasn't properly propagated diff --git a/libs/sysplugins/smarty_internal_get_include_path.php b/libs/sysplugins/smarty_internal_get_include_path.php index 00e1a9a3..518c406a 100644 --- a/libs/sysplugins/smarty_internal_get_include_path.php +++ b/libs/sysplugins/smarty_internal_get_include_path.php @@ -24,6 +24,11 @@ class Smarty_Internal_Get_Include_Path { public static function getIncludePath($filepath) { static $_include_path = null; + + if (function_exists('stream_resolve_include_path')) { + // available since PHP 5.3.2 + return stream_resolve_include_path($filepath); + } if ($_include_path === null) { $_include_path = explode(PATH_SEPARATOR, get_include_path());