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

From: Date: Mon, 25 Oct 2004 16:45:02 +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-1144@lists.php.net to get a copy of this message
cellog Mon Oct 25 12:45:02 2004 EDT Modified files: /pear-core/PEAR/Command Registry.php Log: remove all warnings, and make pear list work with future versions http://cvs.php.net/diff.php/pear-core/PEAR/Command/Registry.php?r1=1.44&r2=1.45&ty=u Index: pear-core/PEAR/Command/Registry.php diff -u pear-core/PEAR/Command/Registry.php:1.44 pear-core/PEAR/Command/Registry.php:1.45 --- pear-core/PEAR/Command/Registry.php:1.44 Thu Oct 21 18:23:19 2004 +++ pear-core/PEAR/Command/Registry.php Mon Oct 25 12:45:02 2004 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Registry.php,v 1.44 2004/10/21 22:23:19 cellog Exp $ +// $Id: Registry.php,v 1.45 2004/10/25 16:45:02 cellog Exp $ require_once 'PEAR/Command/Common.php'; require_once 'PEAR/Registry.php'; @@ -109,7 +109,9 @@ function _sortinfo($a, $b) { - return strcmp($a['package'], $b['package']); + $apackage = isset($a['package']) ? $a['package'] : $a['name']; + $bpackage = isset($b['package']) ? $b['package'] : $b['name']; + return strcmp($apackage, $bpackage); } function doList($command, $options, $params) @@ -137,9 +139,10 @@ 'headline' => array('Package', 'Version', 'State') ); foreach ($installed as $package) { - $data['data'][] = array($package['package'], - $package['version'], - @$package['release_state']); + $pobj = $reg->getPackage(isset($package['package']) ? + $package['package'] : $package['name'], $channel); + $data['data'][] = array($pobj->getPackage(), $pobj->getVersion(), + $pobj->getState() ? $pobj->getState() : null); } if (count($installed)==0) { $data = '(no packages installed)';

« previous php.pear.core (#1144) next »