5 * @subpackage plugins
\r
9 * Get path to file from include_path
\r
11 * @param string $file_path
\r
12 * @param string $new_file_path
\r
14 * @staticvar array|null
\r
17 // $file_path, &$new_file_path
\r
19 function smarty_core_get_include_path(&$params, &$smarty)
\r
21 static $_path_array = null;
\r
23 if(!isset($_path_array)) {
\r
24 $_ini_include_path = ini_get('include_path');
\r
26 if(strstr($_ini_include_path,';')) {
\r
27 // windows pathnames
\r
28 $_path_array = explode(';',$_ini_include_path);
\r
30 $_path_array = explode(':',$_ini_include_path);
\r
33 foreach ($_path_array as $_include_path) {
\r
34 if (file_exists($_include_path . DIRECTORY_SEPARATOR . $params['file_path'])) {
\r
35 $params['new_file_path'] = $_include_path . DIRECTORY_SEPARATOR . $params['file_path'];
\r
42 /* vim: set expandtab: */
\r