00001 <?php
00017
00018
00019 function smarty_core_get_include_path(&$params, &$smarty)
00020 {
00021 static $_path_array = null;
00022
00023 if(!isset($_path_array)) {
00024 $_ini_include_path = ini_get('include_path');
00025
00026 if(strstr($_ini_include_path,';')) {
00027
00028 $_path_array = explode(';',$_ini_include_path);
00029 } else {
00030 $_path_array = explode(':',$_ini_include_path);
00031 }
00032 }
00033 foreach ($_path_array as $_include_path) {
00034 if (@is_readable($_include_path . DIRECTORY_SEPARATOR . $params['file_path'])) {
00035 $params['new_file_path'] = $_include_path . DIRECTORY_SEPARATOR . $params['file_path'];
00036 return true;
00037 }
00038 }
00039 return false;
00040 }
00041
00042
00043
00044 ?>