cvs: pear-core /PEAR Downloader.php
| From: | Greg Beaver | Date: | Thu, 03 Mar 2005 23:39:44 +0000 |
| Subject: | cvs: pear-core /PEAR Downloader.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-30039@lists.php.net to get a copy of this message | ||
cellog Thu Mar 3 18:39:44 2005 EDT
Modified files:
/pear-core/PEAR Downloader.php
Log:
fix several notices and a few bugs caused by variable name/
non-declaration issues
(all caught by ZDE's analyze feature, incidentally)
http://cvs.php.net/diff.php/pear-core/PEAR/Downloader.php?r1=1.61&r2=1.62&ty=u
Index: pear-core/PEAR/Downloader.php
diff -u pear-core/PEAR/Downloader.php:1.61 pear-core/PEAR/Downloader.php:1.62
--- pear-core/PEAR/Downloader.php:1.61 Mon Feb 21 23:45:18 2005
+++ pear-core/PEAR/Downloader.php Thu Mar 3 18:39:43 2005
@@ -19,7 +19,7 @@
// | Martin Jansen <mj@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Downloader.php,v 1.61 2005/02/22 04:45:18 cellog Exp $
+// $Id: Downloader.php,v 1.62 2005/03/03 23:39:43 cellog Exp $
require_once 'PEAR/Common.php';
require_once 'PEAR/ChannelFile.php';
@@ -203,7 +203,7 @@
$alias = $b->getAlias();
}
$this->log(1, 'Auto-discovered channel "' . $channel .
- '", alias "' . $b->getAlias() . '", adding to
registry');
+ '", alias "' . $alias . '", adding to
registry');
}
return true;
}
@@ -308,7 +308,7 @@
$pf = &$params[$i]->download();
PEAR::staticPopErrorHandling();
if (PEAR::isError($pf)) {
- if (!isset($options['soft'])) {
+ if (!isset($this->_options['soft'])) {
$this->log(1, $pf->getMessage());
$this->log(0, 'Error: cannot download "' .
$this->_registry->parsedPackageNameToString($package->getParsedPackage(),
@@ -687,7 +687,7 @@
if ($this === null || $this->_registry === null) {
$package = "http://pear.php.net/get/$package";
} else {
- $chan = $this->_registry->getChannel();
+ $chan = $this->_registry->getChannel($channel);
$package = "http://" . $chan->getServer() .
"/get/$package";
}
if (!extension_loaded("zlib")) {
@@ -1108,7 +1108,7 @@
$password = $config->get('password');
if ($username && $password) {
$tmp = base64_encode("$username:$password");
- $req_headers .= "Authorization: Basic $tmp\r\n";
+ $request .= "Authorization: Basic $tmp\r\n";
}
}
if ($proxy_host != '' && $proxy_user != '') {