From: Greg Beaver Date: Sun, 7 Dec 2003 00:11:45 +0000 (+0000) Subject: MFH last 2 commits X-Git-Tag: php-4.3.5RC1~97 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=592380ac7cdd80d8ed2041a35219b262e13fb754;p=php MFH last 2 commits --- diff --git a/pear/PEAR/Frontend/CLI.php b/pear/PEAR/Frontend/CLI.php index 7604077d46..f525cc8956 100644 --- a/pear/PEAR/Frontend/CLI.php +++ b/pear/PEAR/Frontend/CLI.php @@ -304,6 +304,12 @@ class PEAR_Frontend_CLI extends PEAR } for ($i = 0; $i < sizeof($table_data); $i++) { extract($table_data[$i]); + if (!is_array($rowparams)) { + $rowparams = array(); + } + if (!is_array($colparams)) { + $colparams = array(); + } $rowlines = array(); if ($height > 1) { for ($c = 0; $c < sizeof($data); $c++) { @@ -357,8 +363,7 @@ class PEAR_Frontend_CLI extends PEAR function outputData($data, $command = '_default') { - switch ($command) - { + switch ($command) { case 'install': case 'upgrade': case 'upgrade-all': @@ -371,13 +376,14 @@ class PEAR_Frontend_CLI extends PEAR $this->_tableRow(array($data['release_warnings']), null, array(1 => array('wrap' => 55))); $this->_endTable(); $this->_displayLine(''); - }; + } $this->_displayLine($data['data']); break; case 'search': $this->_startTable($data); - if (isset($data['headline']) && is_array($data['headline'])) + if (isset($data['headline']) && is_array($data['headline'])) { $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); + } foreach($data['data'] as $category) { foreach($category as $pkg) { @@ -388,8 +394,9 @@ class PEAR_Frontend_CLI extends PEAR break; case 'list-all': $this->_startTable($data); - if (isset($data['headline']) && is_array($data['headline'])) + if (isset($data['headline']) && is_array($data['headline'])) { $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); + } foreach($data['data'] as $category) { foreach($category as $pkg) { @@ -436,8 +443,7 @@ class PEAR_Frontend_CLI extends PEAR ), ); default: { - if (is_array($data)) - { + if (is_array($data)) { $this->_startTable($data); $count = count($data['data'][0]); if ($count == 2) { @@ -445,7 +451,7 @@ class PEAR_Frontend_CLI extends PEAR 1 => array('wrap' => 48) ); } elseif ($count == 3) { - $opts = array(0 => array('wrap' => 20), + $opts = array(0 => array('wrap' => 30), 1 => array('wrap' => 20), 2 => array('wrap' => 35) );