update get_include_path, get _path_array only once

This commit is contained in:
mohrt
2002-06-26 16:08:29 +00:00
parent 2841de44a2
commit 9eb4b64890
4 changed files with 22 additions and 16 deletions

View File

@@ -1919,15 +1919,18 @@ function _run_insert_handler($args)
\*======================================================================*/
function _get_include_path($file_path,&$new_file_path)
{
$_ini_include_path = ini_get('include_path');
static $_path_array = null;
if(strstr($_ini_include_path,';')) {
// windows pathnames
$_path_array = explode(';',$_ini_include_path);
} else {
$_path_array = explode(':',$_ini_include_path);
if(!isset($_path_array)) {
$_ini_include_path = ini_get('include_path');
if(strstr($_ini_include_path,';')) {
// windows pathnames
$_path_array = explode(';',$_ini_include_path);
} else {
$_path_array = explode(':',$_ini_include_path);
}
}
foreach ($_path_array as $_include_path) {
if (@file_exists($_include_path . DIR_SEP . $file_path)) {
$new_file_path = $_include_path . DIR_SEP . $file_path;

View File

@@ -1,6 +1,6 @@
<HTML>
<HEAD>
{popup_init}
{popup_init src="/javascripts/hiermenus.js"}
</HEAD>
<BODY bgcolor="#ffffff">
<TITLE>{$title} - {$Name}</TITLE>

View File

@@ -1919,15 +1919,18 @@ function _run_insert_handler($args)
\*======================================================================*/
function _get_include_path($file_path,&$new_file_path)
{
$_ini_include_path = ini_get('include_path');
static $_path_array = null;
if(strstr($_ini_include_path,';')) {
// windows pathnames
$_path_array = explode(';',$_ini_include_path);
} else {
$_path_array = explode(':',$_ini_include_path);
if(!isset($_path_array)) {
$_ini_include_path = ini_get('include_path');
if(strstr($_ini_include_path,';')) {
// windows pathnames
$_path_array = explode(';',$_ini_include_path);
} else {
$_path_array = explode(':',$_ini_include_path);
}
}
foreach ($_path_array as $_include_path) {
if (@file_exists($_include_path . DIR_SEP . $file_path)) {
$new_file_path = $_include_path . DIR_SEP . $file_path;

View File

@@ -1,6 +1,6 @@
<HTML>
<HEAD>
{popup_init}
{popup_init src="/javascripts/hiermenus.js"}
</HEAD>
<BODY bgcolor="#ffffff">
<TITLE>{$title} - {$Name}</TITLE>