changed git call from https to git readonly
[atutor.git] / mods / phpdoc2 / PhpDocumentor / phpDocumentor / Smarty-2.6.0 / libs / core / core.get_include_path.php
1 <?php\r
2 /**\r
3  * Smarty plugin\r
4  * @package Smarty\r
5  * @subpackage plugins\r
6  */\r
7 \r
8 /**\r
9  * Get path to file from include_path\r
10  *\r
11  * @param string $file_path\r
12  * @param string $new_file_path\r
13  * @return boolean\r
14  * @staticvar array|null\r
15  */\r
16 \r
17 //  $file_path, &$new_file_path\r
18 \r
19 function smarty_core_get_include_path(&$params, &$smarty)\r
20 {\r
21     static $_path_array = null;\r
22 \r
23     if(!isset($_path_array)) {\r
24         $_ini_include_path = ini_get('include_path');\r
25 \r
26         if(strstr($_ini_include_path,';')) {\r
27             // windows pathnames\r
28             $_path_array = explode(';',$_ini_include_path);\r
29         } else {\r
30             $_path_array = explode(':',$_ini_include_path);\r
31         }\r
32     }\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
36             return true;\r
37         }\r
38     }\r
39     return false;\r
40 }\r
41 \r
42 /* vim: set expandtab: */\r
43 \r
44 ?>\r