]> granicus.if.org Git - php/commitdiff
* sort package names in "pear list"
authorStig Bakken <ssb@php.net>
Tue, 4 Jun 2002 15:25:23 +0000 (15:25 +0000)
committerStig Bakken <ssb@php.net>
Tue, 4 Jun 2002 15:25:23 +0000 (15:25 +0000)
pear/PEAR/Command/Registry.php

index 5eeee9befa23fbe5f9d338d1a97454dc194d7422..1196a870c68ad9432c7adbeb0ccbbb3908e05c88 100644 (file)
@@ -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:',