mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
update get_include_path, get _path_array only once
This commit is contained in:
@@ -1919,6 +1919,9 @@ function _run_insert_handler($args)
|
||||
\*======================================================================*/
|
||||
function _get_include_path($file_path,&$new_file_path)
|
||||
{
|
||||
static $_path_array = null;
|
||||
|
||||
if(!isset($_path_array)) {
|
||||
$_ini_include_path = ini_get('include_path');
|
||||
|
||||
if(strstr($_ini_include_path,';')) {
|
||||
@@ -1927,7 +1930,7 @@ function _run_insert_handler($args)
|
||||
} 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;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
{popup_init}
|
||||
{popup_init src="/javascripts/hiermenus.js"}
|
||||
</HEAD>
|
||||
<BODY bgcolor="#ffffff">
|
||||
<TITLE>{$title} - {$Name}</TITLE>
|
||||
|
@@ -1919,6 +1919,9 @@ function _run_insert_handler($args)
|
||||
\*======================================================================*/
|
||||
function _get_include_path($file_path,&$new_file_path)
|
||||
{
|
||||
static $_path_array = null;
|
||||
|
||||
if(!isset($_path_array)) {
|
||||
$_ini_include_path = ini_get('include_path');
|
||||
|
||||
if(strstr($_ini_include_path,';')) {
|
||||
@@ -1927,7 +1930,7 @@ function _run_insert_handler($args)
|
||||
} 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;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
{popup_init}
|
||||
{popup_init src="/javascripts/hiermenus.js"}
|
||||
</HEAD>
|
||||
<BODY bgcolor="#ffffff">
|
||||
<TITLE>{$title} - {$Name}</TITLE>
|
||||
|
Reference in New Issue
Block a user