From: Geoffrey T. D. <da...@us...> - 2001-10-29 20:43:20
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv6817/lib Modified Files: FileFinder.php Log Message: (Slightly modified) SF Patch #473466 by <ax...@co...>. Fixes to work on windows systems where the path separator is ';' rather than ':'. Index: FileFinder.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/FileFinder.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** FileFinder.php 2001/09/20 18:26:14 1.2 --- FileFinder.php 2001/10/29 20:43:18 1.3 *************** *** 101,104 **** --- 101,115 ---- /** + * The system-dependent path-separator character. On UNIX systems, + * this character is ':'; on Win32 systems it is ';'. + * + * @access private + * @return string path_separator. + */ + function _get_path_separator () { + return preg_match('/^Windows/', php_uname()) ? ';' : ':'; + } + + /** * Get the value of PHP's include_path. * *************** *** 110,114 **** if (empty($path)) $path = '.'; ! return explode(':', $path); } --- 121,125 ---- if (empty($path)) $path = '.'; ! return explode($this->_get_path_separator(), $path); } *************** *** 139,143 **** * but we put it here, as it seems to work-around the bug. */ ! ini_set('include_path', implode(':', $path)); } } --- 150,154 ---- * but we put it here, as it seems to work-around the bug. */ ! ini_set('include_path', implode($this->_get_path_separator(), $path)); } } |