cvs: pear-core /PEAR/Command Channels.php

From: Date: Tue, 14 Dec 2004 19:08:25 +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-27390@lists.php.net to get a copy of this message
cellog Tue Dec 14 14:08:25 2004 EDT Modified files: /pear-core/PEAR/Command Channels.php Log: make sure __uri can't be deleted either http://cvs.php.net/diff.php/pear-core/PEAR/Command/Channels.php?r1=1.21&r2=1.22&ty=u Index: pear-core/PEAR/Command/Channels.php diff -u pear-core/PEAR/Command/Channels.php:1.21 pear-core/PEAR/Command/Channels.php:1.22 --- pear-core/PEAR/Command/Channels.php:1.21 Tue Dec 14 00:25:29 2004 +++ pear-core/PEAR/Command/Channels.php Tue Dec 14 14:08:24 2004 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Channels.php,v 1.21 2004/12/14 05:25:29 cellog Exp $ +// $Id: Channels.php,v 1.22 2004/12/14 19:08:24 cellog Exp $ require_once 'PEAR/Command/Common.php'; require_once 'PEAR/Registry.php'; @@ -298,7 +298,11 @@ } else { $fp = @fopen($params[0], 'r'); if (!$fp) { - return $this->raiseError('Cannot open "' . $channel . '"'); + if (@file_exists($params[0])) { + return $this->raiseError('Cannot open "' . $params[0] . '"'); + } else { + return $this->raiseError('Unknown channel "' . $channel . '"'); + } } $contents = ''; while (!feof($fp)) { @@ -429,6 +433,9 @@ if (($channel = $reg->channelName($params[0])) == 'pear.php.net') { return $this->raiseError('Cannot delete the pear.php.net channel'); } + if (($channel = $reg->channelName($params[0])) == '__uri') { + return $this->raiseError('Cannot delete the __uri pseudo-channel'); + } if (!$reg->channelExists($channel)) { return $this->raiseError('Channel `' . $channel . '\' does not exist'); }

« previous php.pear.cvs (#27390) next »