]> granicus.if.org Git - php/commitdiff
more wrapping cases
authorTomas V.V.Cox <cox@php.net>
Fri, 7 Jun 2002 14:48:01 +0000 (14:48 +0000)
committerTomas V.V.Cox <cox@php.net>
Fri, 7 Jun 2002 14:48:01 +0000 (14:48 +0000)
pear/PEAR/Frontend/CLI.php

index 0c352e45aed02f6e4306a1fc388d919860beb945..e9c4cc9eab98dc5dde41036e6bb23d3e02a97e46 100644 (file)
@@ -409,13 +409,21 @@ class PEAR_Frontend_CLI extends PEAR
                         array("Description", $data['description']),
                         ),
                     );
-            default:
+            default: {
                 if (is_array($data))
                 {
                     $this->_startTable($data);
-                    $opts = array(0 => array('wrap' => 25),
-                                  1 => array('wrap' => 55)
-                    );
+                    $count = count($data['data'][0]);
+                    if ($count == 2) {
+                        $opts = array(0 => array('wrap' => 25),
+                                      1 => array('wrap' => 55)
+                        );
+                    } else {
+                        $opts = array(0 => array('wrap' => 20),
+                                      1 => array('wrap' => 20),
+                                      2 => array('wrap' => 40)
+                        );
+                    }
                     if (isset($data['headline']) && is_array($data['headline'])) {
                         $this->_tableRow($data['headline'],
                                          array('bold' => true),
@@ -428,6 +436,7 @@ class PEAR_Frontend_CLI extends PEAR
                 } else {
                     $this->_displayLine($data);
                 }
+            }
         }
     }