diff options
| author | Tomas V.V.Cox <cox@php.net> | 2002-06-06 07:22:23 +0000 |
|---|---|---|
| committer | Tomas V.V.Cox <cox@php.net> | 2002-06-06 07:22:23 +0000 |
| commit | ec9c0bf0a7fcfd22a56affd963d5d5d64e5fa17d (patch) | |
| tree | f6fa0b0f1621c673d996a2df762848235b787a9d /pear | |
| parent | eb54d687adb88250619c717081036bd1ae04fb1f (diff) | |
| download | php-git-ec9c0bf0a7fcfd22a56affd963d5d5d64e5fa17d.tar.gz | |
Split the doPackageInfo() in doPackageInfo() and _infoForDisplaying()
(this last one can be statically called and is used also from
the "info" command)
Diffstat (limited to 'pear')
| -rw-r--r-- | pear/PEAR/Command/Package.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pear/PEAR/Command/Package.php b/pear/PEAR/Command/Package.php index 7874be2eff..b3aed7b4d4 100644 --- a/pear/PEAR/Command/Package.php +++ b/pear/PEAR/Command/Package.php @@ -203,11 +203,19 @@ List all depencies the package has.' if (sizeof($params) != 1) { return $this->raiseError("bad parameter(s), try \"help $command\""); } - $obj = new PEAR_Common(); if (PEAR::isError($info = $obj->infoFromTgzFile($params[0]))) { return $info; } + $data = &PEAR_Command_Package::_infoForDisplaying($info); + $this->ui->outputData($data, $command); + } + + /** + * @static + */ + function &_infoForDisplaying($info) + { unset($info['filelist']); unset($info['changelog']); $keys = array_keys($info); @@ -270,8 +278,7 @@ List all depencies the package has.' $key = ucwords(str_replace('_', ' ', $key)); $data['data'][] = array($key, $value); } - $this->ui->outputData($data, $command); - return true; + return $data; } function doPackageValidate($command, $options, $params) |
