From: <var...@us...> - 2010-03-04 15:15:53
|
Revision: 7307 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7307&view=rev Author: vargenau Date: 2010-03-04 15:15:46 +0000 (Thu, 04 Mar 2010) Log Message: ----------- Use preg_match instead of ereg (deprecated) Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2010-03-04 15:11:56 UTC (rev 7306) +++ trunk/lib/FileFinder.php 2010-03-04 15:15:46 UTC (rev 7307) @@ -156,9 +156,13 @@ * @return bool True if path is absolute. */ function _is_abs($path) { - if (ereg('^/', $path)) return true; - elseif (isWindows() and (eregi('^[a-z]:[/\\]', $path))) return true; - else return false; + if (preg_match('#^/#', $path)) { + return true; + } elseif (isWindows() and (preg_match('#^[a-z]:[/\\]#i', $path))) { + return true; + } else { + return false; + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 12:16:23
|
Revision: 7481 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7481&view=rev Author: rurban Date: 2010-06-07 12:14:25 +0000 (Mon, 07 Jun 2010) Log Message: ----------- enable windows check again Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2010-06-07 12:12:17 UTC (rev 7480) +++ trunk/lib/FileFinder.php 2010-06-07 12:14:25 UTC (rev 7481) @@ -156,7 +156,7 @@ * @return bool True if path is absolute. */ function _is_abs($path) { - if (preg_match('#^/#', $path)) { + if (substr($path,0,1) == '/') { return true; } elseif (isWindows() and (preg_match('#^[a-z]:[/\\]#i', $path))) { return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-17 13:23:06
|
Revision: 7543 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7543&view=rev Author: vargenau Date: 2010-06-17 13:22:59 +0000 (Thu, 17 Jun 2010) Log Message: ----------- Mac OS 9 is dead Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2010-06-17 11:37:30 UTC (rev 7542) +++ trunk/lib/FileFinder.php 2010-06-17 13:22:59 UTC (rev 7543) @@ -63,8 +63,7 @@ return $result; } else { if (isWindows() or $this->_isOtherPathsep()) { - if (isMac()) $from = ":"; - elseif (isWindows()) $from = "\\"; + if (isWindows()) $from = "\\"; else $from = "\\"; // PHP is stupid enough to use \\ instead of \ if (isWindows()) { @@ -119,7 +118,6 @@ if (!empty($this->_pathsep)) return $this->_pathsep; elseif (isWindowsNT()) return "/"; // we can safely use '/' elseif (isWindows()) return "\\"; // FAT might use '\' - elseif (isMac()) return ':'; // MacOsX is / // VMS or LispM is really weird, we ignore it. else return '/'; } @@ -140,9 +138,6 @@ if (isWindows95()) { if (empty($path)) return "\\"; else return (strchr($path,"\\")) ? "\\" : '/'; - } elseif (isMac()) { - if (empty($path)) return ":"; - else return (strchr($path,":")) ? ":" : '/'; } else { return $this->_get_syspath_separator(); } @@ -175,13 +170,8 @@ * @return bool New path (destructive) */ function _strip_last_pathchar(&$path) { - if (isMac()) { - if (substr($path,-1) == ':' or substr($path,-1) == "/") - $path = substr($path,0,-1); - } else { - if (substr($path,-1) == '/' or substr($path,-1) == "\\") - $path = substr($path,0,-1); - } + if (substr($path,-1) == '/' or substr($path,-1) == "\\") + $path = substr($path,0,-1); return $path; } @@ -579,21 +569,6 @@ return $winnt; } -/** - * This is for the OLD Macintosh OS, NOT MacOSX or Darwin! - * This has really ugly pathname semantics. - * ":path" is relative, "Desktop:path" (I think) is absolute. - * FIXME: Please fix this someone. So far not supported. - */ -function isMac() { - return (substr(PHP_OS,0,9) == 'Macintosh'); // not tested! -} - -// probably not needed, same behaviour as on unix. -function isCygwin() { - return (substr(PHP_OS,0,6) == 'CYGWIN'); -} - // Local Variables: // mode: php // tab-width: 8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-09-17 11:33:01
|
Revision: 7692 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7692&view=rev Author: rurban Date: 2010-09-17 11:32:55 +0000 (Fri, 17 Sep 2010) Log Message: ----------- fix windows abs_path Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2010-09-17 08:59:58 UTC (rev 7691) +++ trunk/lib/FileFinder.php 2010-09-17 11:32:55 UTC (rev 7692) @@ -154,7 +154,7 @@ if (substr($path,0,1) == '/') { return true; } elseif (isWindows() and preg_match("/^[a-z]:/i", $path) - and (substr($path,3,1) == "/" or substr($path,3,1) == "\\")) + and (substr($path,2,1) == "/" or substr($path,2,1) == "\\")) { return true; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2012-12-27 11:04:06
|
Revision: 8689 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8689&view=rev Author: vargenau Date: 2012-12-27 11:04:00 +0000 (Thu, 27 Dec 2012) Log Message: ----------- Remove PHP4 Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2012-12-27 11:02:04 UTC (rev 8688) +++ trunk/lib/FileFinder.php 2012-12-27 11:04:00 UTC (rev 8689) @@ -383,13 +383,9 @@ { $this->FileFinder(array_merge( $path, - array('/usr/share/php4', - '/usr/share/php', - '/usr/lib/php4', + array('/usr/share/php', '/usr/lib/php', - '/usr/local/share/php4', '/usr/local/share/php', - '/usr/local/lib/php4', '/usr/local/lib/php', '/System/Library/PHP', '/Apache/pear' // Windows This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2013-07-04 14:43:37
|
Revision: 8824 http://sourceforge.net/p/phpwiki/code/8824 Author: vargenau Date: 2013-07-04 14:43:33 +0000 (Thu, 04 Jul 2013) Log Message: ----------- Assume function_exists("_") Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2013-07-04 14:28:23 UTC (rev 8823) +++ trunk/lib/FileFinder.php 2013-07-04 14:43:33 UTC (rev 8824) @@ -195,10 +195,7 @@ */ function _not_found($file) { - if (function_exists("_")) - trigger_error(sprintf(_("%s: file not found"), $file), E_USER_ERROR); - else - trigger_error(sprintf("%s: file not found", $file), E_USER_ERROR); + trigger_error(sprintf(_("%s: file not found"), $file), E_USER_ERROR); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 15:34:50
|
Revision: 8979 http://sourceforge.net/p/phpwiki/code/8979 Author: vargenau Date: 2014-07-17 15:34:47 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Use public when needed Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2014-07-17 15:27:35 UTC (rev 8978) +++ trunk/lib/FileFinder.php 2014-07-17 15:34:47 UTC (rev 8979) @@ -142,7 +142,7 @@ * @param string $path * @return string path_separator. */ - private function _use_path_separator($path) + public function _use_path_separator($path) { if (isWindows95()) { if (empty($path)) return "\\"; @@ -158,7 +158,7 @@ * @param $path string Path. * @return bool True if path is absolute. */ - private function _is_abs($path) + public function _is_abs($path) { if (substr($path, 0, 1) == '/') { return true; @@ -177,7 +177,7 @@ * @param $path string Path. * @return bool New path (destructive) */ - private function _strip_last_pathchar(&$path) + public function _strip_last_pathchar(&$path) { if (substr($path, -1) == '/' or substr($path, -1) == "\\") $path = substr($path, 0, -1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-18 14:48:40
|
Revision: 8993 http://sourceforge.net/p/phpwiki/code/8993 Author: vargenau Date: 2014-07-18 14:48:33 +0000 (Fri, 18 Jul 2014) Log Message: ----------- private function _get_syspath_separator --> public function _get_syspath_separator Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2014-07-18 14:07:42 UTC (rev 8992) +++ trunk/lib/FileFinder.php 2014-07-18 14:48:33 UTC (rev 8993) @@ -119,7 +119,7 @@ * * @return string path_separator. */ - private function _get_syspath_separator() + public function _get_syspath_separator() { if (!empty($this->_pathsep)) return $this->_pathsep; elseif (isWindowsNT()) return "/"; // we can safely use '/' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-18 14:54:59
|
Revision: 8994 http://sourceforge.net/p/phpwiki/code/8994 Author: vargenau Date: 2014-07-18 14:54:51 +0000 (Fri, 18 Jul 2014) Log Message: ----------- More public Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2014-07-18 14:48:33 UTC (rev 8993) +++ trunk/lib/FileFinder.php 2014-07-18 14:54:51 UTC (rev 8994) @@ -235,7 +235,7 @@ * * @return array Include path. */ - private function _get_include_path() + public function _get_include_path() { if (defined("INCLUDE_PATH")) $path = INCLUDE_PATH; @@ -316,7 +316,7 @@ * * @return string The value of $LANG. */ - private function _get_lang() + public function _get_lang() { if (!empty($GLOBALS['LANG'])) return $GLOBALS['LANG']; @@ -408,7 +408,7 @@ } } } - $this->FileFinder(array_merge($path, $include_path)); + parent::__construct(array_merge($path, $include_path)); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-09 14:10:50
|
Revision: 9234 http://sourceforge.net/p/phpwiki/code/9234 Author: vargenau Date: 2014-10-09 14:10:38 +0000 (Thu, 09 Oct 2014) Log Message: ----------- function _get_lang is static Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2014-10-09 14:09:54 UTC (rev 9233) +++ trunk/lib/FileFinder.php 2014-10-09 14:10:38 UTC (rev 9234) @@ -316,7 +316,7 @@ * * @return string The value of $LANG. */ - public function _get_lang() + public static function _get_lang() { if (!empty($GLOBALS['LANG'])) return $GLOBALS['LANG']; @@ -447,7 +447,7 @@ } } - $this->FileFinder(array_merge($path, $include_path)); + parent::__construct(array_merge($path, $include_path)); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2015-09-10 16:42:46
|
Revision: 9722 http://sourceforge.net/p/phpwiki/code/9722 Author: vargenau Date: 2015-09-10 16:42:44 +0000 (Thu, 10 Sep 2015) Log Message: ----------- Add public/private Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2015-09-07 16:35:27 UTC (rev 9721) +++ trunk/lib/FileFinder.php 2015-09-10 16:42:44 UTC (rev 9722) @@ -33,7 +33,7 @@ * @param bool $missing_okay * @return string The filename (including path), if found, otherwise false. */ - function findFile($file, $missing_okay = false) + public function findFile($file, $missing_okay = false) { if ($this->_is_abs($file)) { if (file_exists($file)) @@ -52,7 +52,7 @@ * @param string $path * @return mixed|string */ - function slashifyPath($path) + public function slashifyPath($path) { return $this->forcePathSlashes($path, $this->_pathsep); } @@ -64,7 +64,7 @@ * @param string $sep * @return mixed|string */ - function forcePathSlashes($path, $sep = '/') + public function forcePathSlashes($path, $sep = '/') { if (is_array($path)) { $result = array(); @@ -99,7 +99,7 @@ * @param string $file File to include. * @return bool True if file was successfully included. */ - function includeOnce($file) + public function includeOnce($file) { if (($ret = @include_once($file))) return $ret; @@ -113,7 +113,7 @@ return $this->_not_found($file); } - function _isOtherPathsep() + private function _isOtherPathsep() { return $this->_pathsep != '/'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-06-29 13:11:21
|
Revision: 10338 http://sourceforge.net/p/phpwiki/code/10338 Author: vargenau Date: 2021-06-29 13:11:19 +0000 (Tue, 29 Jun 2021) Log Message: ----------- PHP function implode(): separator must be the first argument Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2021-06-29 12:54:19 UTC (rev 10337) +++ trunk/lib/FileFinder.php 2021-06-29 13:11:19 UTC (rev 10338) @@ -320,7 +320,7 @@ array_splice($this->_path, $i, 1); } array_unshift($this->_path, $dir); - $GLOBALS['INCLUDE_PATH'] = implode($this->_path, $this->_get_ini_separator()); + $GLOBALS['INCLUDE_PATH'] = implode($this->_get_ini_separator(), $this->_path); @ini_set('include_path', $GLOBALS['INCLUDE_PATH']); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-08-06 08:01:01
|
Revision: 10445 http://sourceforge.net/p/phpwiki/code/10445 Author: vargenau Date: 2021-08-06 08:01:00 +0000 (Fri, 06 Aug 2021) Log Message: ----------- lib/FileFinder.php: remove unused class PearFileFinder, remove unused function includeOnce Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2021-08-06 07:59:01 UTC (rev 10444) +++ trunk/lib/FileFinder.php 2021-08-06 08:01:00 UTC (rev 10445) @@ -74,7 +74,7 @@ * This might not work on Windows95 or FAT volumes. (not tested) * * @param string $path - * @return mixed|string + * @return array|string */ public function slashifyPath($path) { @@ -86,7 +86,7 @@ * * @param string $path * @param string $sep - * @return mixed|string + * @return array|string */ public function forcePathSlashes($path, $sep = '/') { @@ -113,30 +113,6 @@ } } - /** - * Try to include file. - * - * If file is found in the path, then the files directory is added - * to PHP's include_path (if it's not already there.) Then the - * file is include_once()'d. - * - * @param string $file File to include. - * @return bool True if file was successfully included. - */ - public function includeOnce($file) - { - if (($ret = @include_once($file))) - return $ret; - - if (!$this->_is_abs($file)) { - if (($dir = $this->_search_path($file)) && is_file($dir . $this->_pathsep . $file)) { - $this->_append_to_include_path($dir); - return include_once($file); - } - } - return $this->_not_found($file); - } - private function _isOtherPathsep() { return $this->_pathsep != '/'; @@ -366,46 +342,6 @@ } /** - * A class for finding PEAR code. - * - * This is a subclass of FileFinder which searches a standard list of - * directories where PEAR code is likely to be installed. - * - * Example usage: - * - * <pre> - * $pearFinder = new PearFileFinder(); - * $pearFinder->includeOnce('DB.php'); - * </pre> - * - * The above code will look for 'DB.php', if found, the directory in - * which it was found will be added to PHP's include_path, and the - * file will be included. (If the file is not found, and E_USER_ERROR - * will be thrown.) - */ -class PearFileFinder - extends FileFinder -{ - /** - * @param $path array Where to look for PEAR library code. - * A good set of defaults is provided, so you can probably leave - * this parameter blank. - */ - function __construct($path = array()) - { - parent::__construct(array_merge( - $path, - array('/usr/share/php', - '/usr/lib/php', - '/usr/local/share/php', - '/usr/local/lib/php', - '/System/Library/PHP', - '/Apache/pear' // Windows - ))); - } -} - -/** * Find PhpWiki localized files. * * This is a subclass of FileFinder which searches PHP's include_path @@ -571,9 +507,7 @@ { static $win; if (isset($win)) return $win; - //return preg_match('/^Windows/', php_uname()); - $win = (substr(PHP_OS, 0, 3) == 'WIN'); - return $win; + return (substr(PHP_OS, 0, 3) == 'WIN'); } function isWindows95() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-09-17 14:10:36
|
Revision: 10566 http://sourceforge.net/p/phpwiki/code/10566 Author: vargenau Date: 2021-09-17 14:10:33 +0000 (Fri, 17 Sep 2021) Log Message: ----------- $sep is "/" Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2021-09-17 13:29:39 UTC (rev 10565) +++ trunk/lib/FileFinder.php 2021-09-17 14:10:33 UTC (rev 10566) @@ -101,7 +101,7 @@ $path = str_replace('\\\\', '\\', $path); else // UNC paths $path = '\\\\' . str_replace('\\\\', '\\', substr($path, 2)); - return strtr($path, $from, $sep); + return strtr($path, $from, '/'); } else return $path; } @@ -130,7 +130,7 @@ * Strip ending '/' or '\' from path. * * @param $path string Path. - * @return bool New path (destructive) + * @return string New path (destructive) */ public function _strip_last_pathchar(&$path) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-09-17 14:23:56
|
Revision: 10568 http://sourceforge.net/p/phpwiki/code/10568 Author: vargenau Date: 2021-09-17 14:23:54 +0000 (Fri, 17 Sep 2021) Log Message: ----------- Replace forcePathSlashes by slashifyPath Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2021-09-17 14:16:43 UTC (rev 10567) +++ trunk/lib/FileFinder.php 2021-09-17 14:23:54 UTC (rev 10568) @@ -68,7 +68,7 @@ } /** - * Unify used pathsep character. + * Force using '/' as path separator. * Accepts array of paths also. * * @param string|array $path @@ -76,21 +76,10 @@ */ public function slashifyPath($path) { - return $this->forcePathSlashes($path); - } - - /** - * Force using '/' as path separator. - * - * @param string|array $path - * @return string|array - */ - public function forcePathSlashes($path) - { if (is_array($path)) { $result = array(); foreach ($path as $dir) { - $result[] = $this->forcePathSlashes($dir); + $result[] = $this->slashifyPath($dir); } return $result; } else { @@ -439,11 +428,11 @@ $wikipath = DATA_PATH; $wikipath = $finder->_strip_last_pathchar($wikipath); if (!$file) - return $finder->forcePathSlashes($wikipath); + return $finder->slashifyPath($wikipath); else - return $finder->forcePathSlashes($wikipath . '/' . $file); + return $finder->slashifyPath($wikipath . '/' . $file); } else { - return $finder->forcePathSlashes($file); + return $finder->slashifyPath($file); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-09-17 15:06:35
|
Revision: 10569 http://sourceforge.net/p/phpwiki/code/10569 Author: vargenau Date: 2021-09-17 15:06:32 +0000 (Fri, 17 Sep 2021) Log Message: ----------- slashifyPath only takes a string Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2021-09-17 14:23:54 UTC (rev 10568) +++ trunk/lib/FileFinder.php 2021-09-17 15:06:32 UTC (rev 10569) @@ -69,30 +69,22 @@ /** * Force using '/' as path separator. - * Accepts array of paths also. * - * @param string|array $path - * @return string|array + * @param string $path + * @return string */ public function slashifyPath($path) { - if (is_array($path)) { - $result = array(); - foreach ($path as $dir) { - $result[] = $this->slashifyPath($dir); - } - return $result; + if (isWindows()) { + $from = "\\"; + // PHP is stupid enough to use \\ instead of \ + if (substr($path, 0, 2) != '\\\\') + $path = str_replace('\\\\', '\\', $path); + else // UNC paths + $path = '\\\\' . str_replace('\\\\', '\\', substr($path, 2)); + return strtr($path, $from, '/'); } else { - if (isWindows()) { - $from = "\\"; - // PHP is stupid enough to use \\ instead of \ - if (substr($path, 0, 2) != '\\\\') - $path = str_replace('\\\\', '\\', $path); - else // UNC paths - $path = '\\\\' . str_replace('\\\\', '\\', substr($path, 2)); - return strtr($path, $from, '/'); - } else - return $path; + return $path; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2022-01-20 15:12:54
|
Revision: 10915 http://sourceforge.net/p/phpwiki/code/10915 Author: vargenau Date: 2022-01-20 15:12:52 +0000 (Thu, 20 Jan 2022) Log Message: ----------- replace array_search by in_array Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2022-01-20 15:11:56 UTC (rev 10914) +++ trunk/lib/FileFinder.php 2022-01-20 15:12:52 UTC (rev 10915) @@ -216,7 +216,7 @@ { $dir = $this->slashifyPath($dir); // remove duplicates - if ($i = array_search($dir, $this->_path) !== false) { + if ($i = in_array($dir, $this->_path)) { array_splice($this->_path, $i, 1); } array_unshift($this->_path, $dir); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2024-01-29 18:43:25
|
Revision: 11076 http://sourceforge.net/p/phpwiki/code/11076 Author: vargenau Date: 2024-01-29 18:43:23 +0000 (Mon, 29 Jan 2024) Log Message: ----------- lib/FileFinder.php: fix test, it is an array Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2024-01-24 12:07:18 UTC (rev 11075) +++ trunk/lib/FileFinder.php 2024-01-29 18:43:23 UTC (rev 11076) @@ -29,7 +29,7 @@ /** * A class for finding files. * - * This should really provided by pear. We don't want really to mess around + * This should really be provided by pear. We don't want really to mess around * with all the lousy systems. (WindowsNT, Win95, Mac, ...) * But pear has only System and File, which do nothing. * Anyway, in good PHP style we ignore the rest of the world and try to behave @@ -44,7 +44,7 @@ */ public function __construct($path = array()) { - if (!isset($this->_path) and $path === false) { + if (!isset($this->_path) and $path === array()) { $path = $this->_get_include_path(); } $this->_path = $path; @@ -207,7 +207,7 @@ * be enough to fix the problem * * This following line should be in the above if-block, but we - * put it here, as it seems to work-around the bug. + * put it here, as it seems to work around the bug. */ $GLOBALS['INCLUDE_PATH'] = implode($this->_get_ini_separator(), $this->_path); @ini_set('include_path', $GLOBALS['INCLUDE_PATH']); @@ -236,7 +236,7 @@ * Return all the possible shortened locale specifiers for the given locale. * Most specific first. * de_DE.iso8859-1@euro => de_DE.iso8859-1, de_DE, de - * This code might needed somewhere else also. + * This code might be needed somewhere else also. * * @param string $lang Locale string */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |