]> granicus.if.org Git - php/commitdiff
make 'pear search' work with CLI. fix a typo
authorChristian Dickmann <dickmann@php.net>
Sun, 2 Jun 2002 20:13:50 +0000 (20:13 +0000)
committerChristian Dickmann <dickmann@php.net>
Sun, 2 Jun 2002 20:13:50 +0000 (20:13 +0000)
pear/PEAR/Command/Remote.php
pear/PEAR/Frontend/CLI.php

index 2550236be52c32e5498b1cea2399e7f4213de19e..e34b3c768d9729e9b017acfd5c5cea0f57469f1a 100644 (file)
@@ -135,7 +135,7 @@ version of DB is 1.2, the downloaded file will be DB-1.2.tgz.',
     
         $this->ui->outputData($info, $command);
         
-        return false; // coming soon
+        return true; // coming soon
     }
 
     // }}}
index 5032d18b5821240b5f8393c646f4d48412ad34a4..d0b029bace172c6115ae70abe9ceaf381a7232b8 100644 (file)
@@ -355,6 +355,18 @@ class PEAR_Frontend_CLI extends PEAR
     {
         switch ($command)
         {
+            case 'search':
+                $this->_startTable($data);
+                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) {
+                        $this->_tableRow($pkg, null, array(1 => array('wrap' => 55)));
+                    }
+                };
+                $this->_endTable();
+                break;
             case 'list-all':
                 $this->_startTable($data);
                 if (isset($data['headline']) && is_array($data['headline']))