17 static $_filepaths_cache = array();
19 $_plugin_filename = $params[
'type'] .
'.' . $params[
'name'] .
'.php';
20 if (isset($_filepaths_cache[$_plugin_filename])) {
21 return $_filepaths_cache[$_plugin_filename];
25 foreach ((array)$smarty->plugins_dir as $_plugin_dir) {
30 if (!preg_match(
"/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $_plugin_dir)) {
31 $_relative_paths[] = $_plugin_dir;
33 if (@is_readable(
SMARTY_DIR . $_plugin_filepath)) {
39 if (@is_readable($_plugin_filepath)) {
40 $_return = $_plugin_filepath;
45 if($_return ===
false) {
47 if(isset($_relative_paths)) {
48 foreach ((array)$_relative_paths as $_plugin_dir) {
52 $_params = array(
'file_path' => $_plugin_filepath);
53 require_once(SMARTY_CORE_DIR .
'core.get_include_path.php');
55 $_return = $_params[
'new_file_path'];
61 $_filepaths_cache[$_plugin_filename] = $_return;