cvs: pear-core /PEAR/Command Channels.php
| From: | Greg Beaver | Date: | Sat, 14 Aug 2004 14:14:43 +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-22898@lists.php.net to get a copy of this message | ||
cellog Sat Aug 14 10:14:43 2004 EDT
Modified files:
/pear-core/PEAR/Command Channels.php
Log:
write out the configuration file when a new channel is updated so that seting configuration values
is possible
delete a channel from configuration when deleting it from the registry
http://cvs.php.net/diff.php/pear-core/PEAR/Command/Channels.php?r1=1.4&r2=1.5&ty=u
Index: pear-core/PEAR/Command/Channels.php
diff -u pear-core/PEAR/Command/Channels.php:1.4 pear-core/PEAR/Command/Channels.php:1.5
--- pear-core/PEAR/Command/Channels.php:1.4 Fri Aug 13 19:02:37 2004
+++ pear-core/PEAR/Command/Channels.php Sat Aug 14 10:14:43 2004
@@ -17,7 +17,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: Channels.php,v 1.4 2004/08/13 23:02:37 cellog Exp $
+// $Id: Channels.php,v 1.5 2004/08/14 14:14:43 cellog Exp $
require_once 'PEAR/Command/Common.php';
require_once 'PEAR/Registry.php';
@@ -327,6 +327,7 @@
if (!$reg->deleteChannel($params[0])) {
return $this->raiseError('Channel deletion failed');
} else {
+ $this->config->deleteChannel($params[0]);
$this->ui->outputData('Channel `' . $params[0] . '\'
deleted');
}
}
@@ -371,6 +372,8 @@
if (!$ret) {
return $this->raiseError("Adding Channel `" . $channel->getName() .
"' to registry failed");
}
+ $this->config->setChannels($reg->listChannels());
+ $this->config->writeConfigFile();
$this->ui->outputData('Adding Channel `' . $channel->getName() .
'\' succeeded');
}
@@ -448,6 +451,8 @@
if (!$ret) {
return $this->raiseError("Updating Channel `" . $channel->getName() .
"' in registry failed");
}
+ $this->config->setChannels($reg->listChannels());
+ $this->config->writeConfigFile();
$this->ui->outputData('Update of Channel `' . $channel->getName() .
'\' succeeded');
}
}