]> granicus.if.org Git - php/commitdiff
Added local version installed in "list-upgrades"
authorTomas V.V.Cox <cox@php.net>
Mon, 30 Jun 2003 13:12:50 +0000 (13:12 +0000)
committerTomas V.V.Cox <cox@php.net>
Mon, 30 Jun 2003 13:12:50 +0000 (13:12 +0000)
(http://bugs.php.net/bug.php?id=24298)

pear/PEAR/Command/Remote.php
pear/PEAR/Frontend/CLI.php

index 9d23dc73910147fba09f5ae8dc7433a378073b45..45494874dbe5e08b8f4efe0224040a8a7a5aa9b5 100644 (file)
@@ -332,7 +332,7 @@ parameter.
         $data = array(
             'caption' => $caption,
             'border' => 1,
-            'headline' => array('Package', 'Version', 'Size'),
+            'headline' => array('Package', 'Local', 'Remote', 'Size'),
             );
         foreach ($latest as $pkg => $info) {
             $package = strtolower($pkg);
@@ -355,7 +355,7 @@ parameter.
             } else {
                 $fs = "  -"; // XXX center instead
             }
-            $data['data'][] = array($pkg, $version, $fs);
+            $data['data'][] = array($pkg, $inst_version, $version, $fs);
         }
         if (empty($data['data'])) {
             $this->ui->outputData('No upgrades available');
index 5213ea9c91e747afca2114f1bb54cef39a95316c..81326d27b42651286c7952c74dcc75e84dbd20ac 100644 (file)
@@ -449,6 +449,8 @@ class PEAR_Frontend_CLI extends PEAR
                                       1 => array('wrap' => 20),
                                       2 => array('wrap' => 35)
                         );
+                    } else {
+                        $opts = null;
                     }
                     if (isset($data['headline']) && is_array($data['headline'])) {
                         $this->_tableRow($data['headline'],