cvs: php4 /pear/PEAR/Frontend CLI.php
| From: | Tomas V.V.Cox | Date: | Sun, 09 Jun 2002 18:13:00 +0000 |
| Subject: | cvs: php4 /pear/PEAR/Frontend CLI.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4511@lists.php.net to get a copy of this message | ||
cox Sun Jun 9 14:13:00 2002 EDT
Modified files:
/php4/pear/PEAR/Frontend CLI.php
Log:
Beautify config-show output, some wrap changes and fix small
issue with _tableRow() with line counting
Index: php4/pear/PEAR/Frontend/CLI.php
diff -u php4/pear/PEAR/Frontend/CLI.php:1.20 php4/pear/PEAR/Frontend/CLI.php:1.21
--- php4/pear/PEAR/Frontend/CLI.php:1.20 Sun Jun 9 12:28:46 2002
+++ php4/pear/PEAR/Frontend/CLI.php Sun Jun 9 14:12:59 2002
@@ -16,7 +16,7 @@
| Author: Stig Sæther Bakken <ssb@fast.no> |
+----------------------------------------------------------------------+
- $Id: CLI.php,v 1.20 2002/06/09 16:28:46 cox Exp $
+ $Id: CLI.php,v 1.21 2002/06/09 18:12:59 cox Exp $
*/
require_once "PEAR.php";
@@ -225,7 +225,7 @@
$w = strlen($line);
}
}
- $lines = sizeof($lines);
+ $lines = sizeof($multiline);
} else {
$w = strlen($col);
}
@@ -381,18 +381,24 @@
$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 = "<not set>";
- };
- $this->_tableRow($value, null, array(1 => array('wrap'
=> 55)));
+ if ($value[2] == '') {
+ $value[2] = "<not set>";
+ }
+ $this->_tableRow($value, null, $opts);
}
- };
+ }
$this->_endTable();
break;
case 'remote-info':
@@ -416,12 +422,12 @@
$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'])) {