summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Dickmann <dickmann@php.net>2002-05-30 10:14:57 +0000
committerChristian Dickmann <dickmann@php.net>2002-05-30 10:14:57 +0000
commit90146bca858a41ab556d1d6dab428ddd5133b532 (patch)
tree0e24f3a3bc87ac20ddf26f6705cb2c93dcefac37
parented7a2d9bd16600cbc9e51602b8ae3f6aacf7cbe7 (diff)
downloadphp-git-90146bca858a41ab556d1d6dab428ddd5133b532.tar.gz
fix a typo. add some information to config-show
-rw-r--r--pear/PEAR/Command/Config.php2
-rw-r--r--pear/PEAR/Command/Remote.php15
-rw-r--r--pear/PEAR/Frontend/CLI.php14
3 files changed, 26 insertions, 5 deletions
diff --git a/pear/PEAR/Command/Config.php b/pear/PEAR/Command/Config.php
index 98098a53cb..5b7675faf5 100644
--- a/pear/PEAR/Command/Config.php
+++ b/pear/PEAR/Command/Config.php
@@ -104,7 +104,7 @@ in. The default layer is "user".
} elseif ($value === true) {
$value = 'true';
}
- $data['data'][] = array($key, $value);
+ $data['data'][$this->config->getGroup($key)][] = array($this->config->getPrompt($key) , $key, $value);
}
$this->ui->outputData($data, $command);
return true;
diff --git a/pear/PEAR/Command/Remote.php b/pear/PEAR/Command/Remote.php
index 90df1c8974..f6b14881da 100644
--- a/pear/PEAR/Command/Remote.php
+++ b/pear/PEAR/Command/Remote.php
@@ -96,11 +96,21 @@ version of DB is 1.2, the downloaded file will be DB-1.2.tgz.',
// }}}
- // {{{ info-remote
+ // {{{ remote-info
- function doInfoRemote($command, $options, $params)
+ function doRemoteInfo($command, $options, $params)
{
return false; // coming soon
+ var_dump($params[0]);
+ $r = new PEAR_Remote($this->config);
+ $info = $r->call('package.info', $params[0]);
+ if (PEAR::isError($info)) {
+ return $this->raiseError($info);
+ }
+
+ var_dump($info);
+
+ return false; // coming soon
}
// }}}
@@ -140,7 +150,6 @@ version of DB is 1.2, the downloaded file will be DB-1.2.tgz.',
if (PEAR::isError($available)) {
return $this->raiseError($available);
}
- $i = $j = 0;
$data = array(
'caption' => 'All packages:',
'border' => true,
diff --git a/pear/PEAR/Frontend/CLI.php b/pear/PEAR/Frontend/CLI.php
index c829937812..aca8050654 100644
--- a/pear/PEAR/Frontend/CLI.php
+++ b/pear/PEAR/Frontend/CLI.php
@@ -378,6 +378,18 @@ class PEAR_Frontend_CLI extends PEAR
};
$this->_endTable();
break;
+ case 'config-show':
+ $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 $group) {
+ foreach($group as $value) {
+ $this->_tableRow($value, null, array(1 => array('wrap' => 55)));
+ }
+ };
+ $this->_endTable();
+ break;
default:
if (is_array($data))
{
@@ -397,7 +409,7 @@ class PEAR_Frontend_CLI extends PEAR
function log($text)
{
- return $this->displayLine($text);
+ return $this->_displayLine($text);
}
// {{{ bold($text)