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

From: Date: Fri, 26 Nov 2004 20:14:37 +0000
Subject: cvs: pear-core /PEAR/Command Config.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-26538@lists.php.net to get a copy of this message
cellog Fri Nov 26 15:14:37 2004 EDT Modified files: /pear-core/PEAR/Command Config.php Log: add failure on default_channel set to unknown channel http://cvs.php.net/diff.php/pear-core/PEAR/Command/Config.php?r1=1.34&r2=1.35&ty=u Index: pear-core/PEAR/Command/Config.php diff -u pear-core/PEAR/Command/Config.php:1.34 pear-core/PEAR/Command/Config.php:1.35 --- pear-core/PEAR/Command/Config.php:1.34 Fri Nov 26 14:33:53 2004 +++ pear-core/PEAR/Command/Config.php Fri Nov 26 15:14:36 2004 @@ -18,7 +18,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Config.php,v 1.34 2004/11/26 19:33:53 cellog Exp $ +// $Id: Config.php,v 1.35 2004/11/26 20:14:36 cellog Exp $ require_once "PEAR/Command/Common.php"; require_once "PEAR/Config.php"; @@ -214,7 +214,7 @@ } if ($error = $this->_checkLayer(@$params[2])) { $failmsg .= $error; - return PEAR::raiseError($failmsg); + return PEAR::raiseError("config-set:$failmsg"); } $channel = isset($options['channel']) ? $options['channel'] : $this->config->get('default_channel'); @@ -222,6 +222,11 @@ if (!$reg->channelExists($channel)) { return $this->raiseError('Channel "' . $channel . '" does not exist'); } + if ($params[0] == 'default_channel') { + if (!$reg->channelExists($params[1])) { + return $this->raiseError('Channel "' . $params[1] . '" does not exist'); + } + } array_push($params, $channel); if (!call_user_func_array(array(&$this->config, 'set'), $params)) {

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