From: Tomas V.V.Cox Date: Sun, 9 Jun 2002 18:12:59 +0000 (+0000) Subject: Beautify config-show output, some wrap changes and fix small X-Git-Tag: php5_5_0~107 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c8599222ef855425d3811352699df68c19692e8;p=php Beautify config-show output, some wrap changes and fix small issue with _tableRow() with line counting --- diff --git a/pear/PEAR/Frontend/CLI.php b/pear/PEAR/Frontend/CLI.php index a6f0e196d0..3366138714 100644 --- a/pear/PEAR/Frontend/CLI.php +++ b/pear/PEAR/Frontend/CLI.php @@ -225,7 +225,7 @@ class PEAR_Frontend_CLI extends PEAR $w = strlen($line); } } - $lines = sizeof($lines); + $lines = sizeof($multiline); } else { $w = strlen($col); } @@ -381,18 +381,24 @@ class PEAR_Frontend_CLI extends PEAR $this->_endTable(); break; case 'config-show': + $data['border'] = true; + $opts = array(0 => array('wrap' => 20), + 1 => array('wrap' => 20), + 2 => array('wrap' => 35)); $this->_startTable($data); - if (isset($data['headline']) && is_array($data['headline'])) - $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); - + if (isset($data['headline']) && is_array($data['headline'])) { + $this->_tableRow($data['headline'], + array('bold' => true), + $opts); + } foreach($data['data'] as $group) { foreach($group as $value) { - if ($value === null || $value === '') { - $value = ""; - }; - $this->_tableRow($value, null, array(1 => array('wrap' => 55))); + if ($value[2] == '') { + $value[2] = ""; + } + $this->_tableRow($value, null, $opts); } - }; + } $this->_endTable(); break; case 'remote-info': @@ -416,12 +422,12 @@ class PEAR_Frontend_CLI extends PEAR $count = count($data['data'][0]); if ($count == 2) { $opts = array(0 => array('wrap' => 25), - 1 => array('wrap' => 55) + 1 => array('wrap' => 50) ); } elseif ($count == 3) { $opts = array(0 => array('wrap' => 20), 1 => array('wrap' => 20), - 2 => array('wrap' => 40) + 2 => array('wrap' => 35) ); } if (isset($data['headline']) && is_array($data['headline'])) {