cvs: pearweb /public_html go-pear
| From: | Pierre-Alain Joye | Date: | Thu, 17 Aug 2006 19:12:35 +0000 |
| Subject: | cvs: pearweb /public_html go-pear | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-4909@lists.php.net to get a copy of this message | ||
pajoye Thu Aug 17 19:12:35 2006 UTC
Modified files:
/pearweb/public_html go-pear
Log:
- improve detection of local files
http://cvs.php.net/viewvc.cgi/pearweb/public_html/go-pear?r1=1.97&r2=1.98&diff_format=u
Index: pearweb/public_html/go-pear
diff -u pearweb/public_html/go-pear:1.97 pearweb/public_html/go-pear:1.98
--- pearweb/public_html/go-pear:1.97 Sat Jul 8 11:40:37 2006
+++ pearweb/public_html/go-pear Thu Aug 17 19:12:35 2006
@@ -18,7 +18,7 @@
# | Pierre-Alain Joye <pierre@php.net> |
# | Greg Beaver <cellog@php.net> |
# +----------------------------------------------------------------------+
-# $Id: go-pear,v 1.97 2006/07/08 11:40:37 pajoye Exp $
+# $Id: go-pear,v 1.98 2006/08/17 19:12:35 pajoye Exp $
#
# Automatically download all the files needed to run the "pear" command
# (the PEAR package installer). Requires PHP 4.1.0 or newer.
@@ -642,8 +642,12 @@
if ($file == '.' || $file == '..' ||
!is_file(dirname(__FILE__).'/go-pear-bundle/'.$file)) {
continue;
}
- $file_pkg = substr($file, 0, strpos($file, '-'));
- $local_dir[$file_pkg] = $file;
+ $_pos = strpos($file, '-');
+ if ($_pos === false) {
+ $local_dir[$file] = $file;
+ } else {
+ $local_dir[substr($file, 0, $_pos)] = $file;
+ }
}
}