]> granicus.if.org Git - php/commitdiff
* don't cut lines when wrapping output
authorStig Bakken <ssb@php.net>
Sun, 15 Feb 2004 17:43:00 +0000 (17:43 +0000)
committerStig Bakken <ssb@php.net>
Sun, 15 Feb 2004 17:43:00 +0000 (17:43 +0000)
pear/PEAR/Frontend/CLI.php

index cc364979a32a45760496d06046ed1281c739706e..1ecd223c1f8a5393628963f4c3d26ce9a6e6e99a 100644 (file)
@@ -219,7 +219,7 @@ class PEAR_Frontend_CLI extends PEAR
         for ($i = 0; $i < sizeof($columns); $i++) {
             $col = &$columns[$i];
             if (isset($colparams[$i]) && !empty($colparams[$i]['wrap'])) {
-                $col = wordwrap($col, $colparams[$i]['wrap'], "\n", 1);
+                $col = wordwrap($col, $colparams[$i]['wrap'], "\n", 0);
             }
             if (strpos($col, "\n") !== false) {
                 $multiline = explode("\n", $col);
@@ -349,6 +349,9 @@ class PEAR_Frontend_CLI extends PEAR
 
                     $rowtext .= $cellstart . $cell . $cellend;
                 }
+                if (!$border) {
+                    $rowtext = rtrim($rowtext);
+                }
                 $rowtext .= $rowend;
                 $this->_displayLine($rowtext);
             }