cvs: pear-core /PEAR/Command Channels.php
| From: | Greg Beaver | Date: | Wed, 15 Dec 2004 02:19:08 +0000 |
| Subject: | cvs: pear-core /PEAR/Command Channels.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-27406@lists.php.net to get a copy of this message | ||
cellog Tue Dec 14 21:19:08 2004 EDT
Modified files:
/pear-core/PEAR/Command Channels.php
Log:
redo channel-delete error messages
http://cvs.php.net/diff.php/pear-core/PEAR/Command/Channels.php?r1=1.23&r2=1.24&ty=u
Index: pear-core/PEAR/Command/Channels.php
diff -u pear-core/PEAR/Command/Channels.php:1.23 pear-core/PEAR/Command/Channels.php:1.24
--- pear-core/PEAR/Command/Channels.php:1.23 Tue Dec 14 14:09:34 2004
+++ pear-core/PEAR/Command/Channels.php Tue Dec 14 21:19:07 2004
@@ -17,7 +17,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: Channels.php,v 1.23 2004/12/14 19:09:34 cellog Exp $
+// $Id: Channels.php,v 1.24 2004/12/15 02:19:07 cellog Exp $
require_once 'PEAR/Command/Common.php';
require_once 'PEAR/Registry.php';
@@ -427,18 +427,19 @@
function doDelete($command, $options, $params)
{
if (sizeof($params) != 1) {
- return $this->raiseError('No Channel Specified');
+ return $this->raiseError('channel-delete: no channel specified');
}
$reg = &$this->config->getRegistry();
- if (($channel = $reg->channelName($params[0])) == 'pear.php.net') {
+ if (!$reg->channelExists($params[0])) {
+ return $this->raiseError('channel-delete: channel "' . $params[0] .
'" does not exist');
+ }
+ $channel = $reg->channelName($params[0]);
+ if ($channel == 'pear.php.net') {
return $this->raiseError('Cannot delete the pear.php.net channel');
}
- if (($channel = $reg->channelName($params[0])) == '__uri') {
+ if ($channel == '__uri') {
return $this->raiseError('Cannot delete the __uri pseudo-channel');
}
- if (!$reg->channelExists($channel)) {
- return $this->raiseError('Channel "' . $channel . '" does
not exist');
- }
if (PEAR::isError($err = $reg->listPackages($channel))) {
return $err;
}