cvs: smarty / Smarty.class.php

From: Date: Wed, 26 Jun 2002 16:00:57 +0000
Subject: cvs: smarty / Smarty.class.php
Groups: php.smarty.cvs 
Request: Send a blank email to php-smarty-cvs+get-161@lists.php.net to get a copy of this message
mohrt Wed Jun 26 12:00:57 2002 EDT Modified files: /smarty Smarty.class.php Log: fix get_include_path function for windows Index: smarty/Smarty.class.php diff -u smarty/Smarty.class.php:1.289 smarty/Smarty.class.php:1.290 --- smarty/Smarty.class.php:1.289 Wed Jun 26 11:08:35 2002 +++ smarty/Smarty.class.php Wed Jun 26 12:00:55 2002 @@ -1919,7 +1919,16 @@ \*======================================================================*/ function _get_include_path($file_path,&$new_file_path) { - foreach (preg_split('![:;]!', ini_get('include_path')) as $_include_path) { + $_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; return true;

« previous php.smarty.cvs (#161) next »