cvs: pear-core /PEAR/Command Registry.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Tue, 24 Jun 2008 19:02:27 +0000 |
| Subject: | cvs: pear-core /PEAR/Command Registry.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-7608@lists.php.net to get a copy of this message | ||
dufuz Tue Jun 24 19:02:27 2008 UTC
Modified files:
/pear-core/PEAR/Command Registry.php
Log:
Bug #14210 pear list -ia brings warnings
# no packages in channel was not wrapped properly in arrays, only happens if you as the error
message says, have no packages in a channel you are displaying
http://cvs.php.net/viewvc.cgi/pear-core/PEAR/Command/Registry.php?r1=1.82&r2=1.83&diff_format=u
Index: pear-core/PEAR/Command/Registry.php
diff -u pear-core/PEAR/Command/Registry.php:1.82 pear-core/PEAR/Command/Registry.php:1.83
--- pear-core/PEAR/Command/Registry.php:1.82 Sat Jun 14 09:14:12 2008
+++ pear-core/PEAR/Command/Registry.php Tue Jun 24 19:02:27 2008
@@ -16,7 +16,7 @@
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Registry.php,v 1.82 2008/06/14 09:14:12 dufuz Exp $
+ * @version CVS: $Id: Registry.php,v 1.83 2008/06/24 19:02:27 dufuz Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -132,6 +132,7 @@
if (isset($options['allchannels']) && !$channelinfo) {
return $this->doListAll($command, array(), $params);
}
+
if (isset($options['allchannels']) && $channelinfo) {
// allchannels with $channelinfo
unset($options['allchannels']);
@@ -157,6 +158,7 @@
if (count($params) == 1) {
return $this->doFileList($command, $options, $params);
}
+
if (isset($options['channel'])) {
if ($reg->channelExists($options['channel'])) {
$channel = $reg->channelName($options['channel']);
@@ -166,6 +168,7 @@
} else {
$channel = $this->config->get('default_channel');
}
+
$installed = $reg->packageInfo(null, null, $channel);
usort($installed, array(&$this, '_sortinfo'));
@@ -196,6 +199,7 @@
}
$data['data'][] = $packageinfo;
}
+
if (count($installed) == 0) {
if (!$channelinfo) {
$data = '(no packages installed from channel ' . $channel .
')';
@@ -205,10 +209,11 @@
$channel . ':',
'border' => true,
'channel' => $channel,
- 'data' => '(no packages installed)',
+ 'data' => array(array('(no packages installed)')),
);
}
}
+
$this->ui->outputData($data, $command);
return true;
}