From: Christian Dickmann Date: Sun, 2 Jun 2002 20:13:50 +0000 (+0000) Subject: make 'pear search' work with CLI. fix a typo X-Git-Tag: RELEASE_0_90~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19c946cce206cfec35a94fab27bcfd369f3cf8c8;p=php make 'pear search' work with CLI. fix a typo --- diff --git a/pear/PEAR/Command/Remote.php b/pear/PEAR/Command/Remote.php index 2550236be5..e34b3c768d 100644 --- a/pear/PEAR/Command/Remote.php +++ b/pear/PEAR/Command/Remote.php @@ -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 } // }}} diff --git a/pear/PEAR/Frontend/CLI.php b/pear/PEAR/Frontend/CLI.php index 5032d18b58..d0b029bace 100644 --- a/pear/PEAR/Frontend/CLI.php +++ b/pear/PEAR/Frontend/CLI.php @@ -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']))