From: Tomas V.V.Cox Date: Mon, 30 Jun 2003 13:12:50 +0000 (+0000) Subject: Added local version installed in "list-upgrades" X-Git-Tag: BEFORE_ARG_INFO~535 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4513d36892b6523b28f7343400b100b5bc481312;p=php Added local version installed in "list-upgrades" (http://bugs.php.net/bug.php?id=24298) --- diff --git a/pear/PEAR/Command/Remote.php b/pear/PEAR/Command/Remote.php index 9d23dc7391..45494874db 100644 --- a/pear/PEAR/Command/Remote.php +++ b/pear/PEAR/Command/Remote.php @@ -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'); diff --git a/pear/PEAR/Frontend/CLI.php b/pear/PEAR/Frontend/CLI.php index 5213ea9c91..81326d27b4 100644 --- a/pear/PEAR/Frontend/CLI.php +++ b/pear/PEAR/Frontend/CLI.php @@ -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'],