plugins_dir[0].DIRECTORY_SEPARATOR.'modifier.cat.php'; $_filepaths_cache['modifier.escape.php'] = SMARTY_DIR.$smarty->plugins_dir[0].DIRECTORY_SEPARATOR.'modifier.escape.php'; $_filepaths_cache['modifier.truncate.php'] = SMARTY_DIR.$smarty->plugins_dir[0].DIRECTORY_SEPARATOR.'modifier.truncate.php'; $_filepaths_cache['modifier.strip_tags.php'] = SMARTY_DIR.$smarty->plugins_dir[0].DIRECTORY_SEPARATOR.'modifier.strip_tags.php'; $_filepaths_cache['modifier.date_format.php'] = SMARTY_DIR.$smarty->plugins_dir[0].DIRECTORY_SEPARATOR.'modifier.date_format.php'; $_filepaths_cache['shared.make_timestamp.php'] = SMARTY_DIR.$smarty->plugins_dir[0].DIRECTORY_SEPARATOR.'shared.make_timestamp.php'; $_filepaths_cache['function.math.php'] = SMARTY_DIR.$smarty->plugins_dir[0].DIRECTORY_SEPARATOR.'function.math.php'; $_filepaths_cache['function.counter.php'] = SMARTY_DIR.$smarty->plugins_dir[0].DIRECTORY_SEPARATOR.'function.counter.php'; $_filepaths_cache['modifier.default.php'] = SMARTY_DIR.$smarty->plugins_dir[0].DIRECTORY_SEPARATOR.'modifier.default.php'; $_filepaths_cache['compiler.assign.php'] = SMARTY_DIR.$smarty->plugins_dir[0].DIRECTORY_SEPARATOR.'compiler.assign.php'; $_filepaths_cache['modifier.string_format.php'] = SMARTY_DIR.$smarty->plugins_dir[0].DIRECTORY_SEPARATOR.'modifier.string_format.php'; $_filepaths_cache['modifier.nl2br.php'] = SMARTY_DIR.$smarty->plugins_dir[0].DIRECTORY_SEPARATOR.'modifier.nl2br.php'; } /* End */ $_plugin_filename = $params['type'] . '.' . $params['name'] . '.php'; if (isset($_filepaths_cache[$_plugin_filename])) { return $_filepaths_cache[$_plugin_filename]; } $_return = false; foreach ((array)$smarty->plugins_dir as $_plugin_dir) { $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename; // see if path is relative if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $_plugin_dir)) { $_relative_paths[] = $_plugin_dir; // 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; } } if($_return === false) { // still not found, try PHP include_path if(isset($_relative_paths)) { foreach ((array)$_relative_paths as $_plugin_dir) { $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename; $_params = array('file_path' => $_plugin_filepath); require_once(SMARTY_CORE_DIR . 'core.get_include_path.php'); if(smarty_core_get_include_path($_params, $smarty)) { $_return = $_params['new_file_path']; break; } } } } $_filepaths_cache[$_plugin_filename] = $_return; return $_return; } /* vim: set expandtab: */ ?>