From 4317a5c7a99641730a24b1207346d57e08394cb8 Mon Sep 17 00:00:00 2001 From: Stig Bakken Date: Tue, 4 Jun 2002 15:25:23 +0000 Subject: [PATCH] * sort package names in "pear list" --- pear/PEAR/Command/Registry.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pear/PEAR/Command/Registry.php b/pear/PEAR/Command/Registry.php index 5eeee9befa..1196a870c6 100644 --- a/pear/PEAR/Command/Registry.php +++ b/pear/PEAR/Command/Registry.php @@ -68,12 +68,17 @@ Tests if a package is installed in the system. Will exit(1) if it is not. // }}} // {{{ doList() + function _sortinfo($a, $b) + { + return strcmp($a['package'], $b['package']); + } + function doList($command, $options, $params) { $reg = new PEAR_Registry($this->config->get('php_dir')); if (sizeof($params) == 0) { $installed = $reg->packageInfo(); - + usort($installed, array(&$this, '_sortinfo')); $i = $j = 0; $data = array( 'caption' => 'Installed packages:', -- 2.40.0