cvs: php4 /pear/PEAR/Command Registry.php

From: Date: Tue, 21 May 2002 07:18:48 +0000
Subject: cvs: php4 /pear/PEAR/Command Registry.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-4004@lists.php.net to get a copy of this message
ssb Tue May 21 03:18:48 2002 EDT Modified files: /php4/pear/PEAR/Command Registry.php Log: * show installed_as instead of a "calculated" path for installed packages Index: php4/pear/PEAR/Command/Registry.php diff -u php4/pear/PEAR/Command/Registry.php:1.15 php4/pear/PEAR/Command/Registry.php:1.16 --- php4/pear/PEAR/Command/Registry.php:1.15 Tue May 21 03:00:45 2002 +++ php4/pear/PEAR/Command/Registry.php Tue May 21 03:18:48 2002 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Registry.php,v 1.15 2002/05/21 07:00:45 ssb Exp $ +// $Id: Registry.php,v 1.16 2002/05/21 07:18:48 ssb Exp $ require_once 'PEAR/Command/Common.php'; require_once 'PEAR/Registry.php'; @@ -102,45 +102,47 @@ return $this->raiseError("`$params[0]' not installed"); } $list = $info['filelist']; - $caption = 'Contents of ' . basename($params[0]); + if ($installed) { + $caption = 'Installed Files For ' . $params[0]; + } else { + $caption = 'Contents of ' . basename($params[0]); + } $this->ui->startTable(array('caption' => $caption, 'border' => true)); $this->ui->tableRow($headings, array('bold' => true)); foreach ($list as $file => $att) { - if (isset($att['baseinstalldir'])) { - $dest = $att['baseinstalldir'] . DIRECTORY_SEPARATOR . - $file; - } else { - $dest = $file; - } - switch ($att['role']) { - case 'test': - case 'data': - if ($installed) { - break 2; - } - $dest = '-- will not be installed --'; - break; - case 'doc': - $dest = $this->config->get('doc_dir') . DIRECTORY_SEPARATOR . - $dest; - break; - case 'php': - default: - $dest = $this->config->get('php_dir') . DIRECTORY_SEPARATOR . - $dest; - } - $dest = preg_replace('!/+!', '/', $dest); - $file = preg_replace('!/+!', '/', $file); -/* - $opts = array(0 => array('wrap' => 23), - 1 => array('wrap' => 45) - ); -*/ if ($installed) { - $this->ui->tableRow(array($att['role'], $dest), null, $opts); + if (empty($att['installed_as'])) { + continue; + } + $this->ui->tableRow(array($att['role'], $att['installed_as'])); } else { - $this->ui->tableRow(array($file, $dest), null, $opts); + if (isset($att['baseinstalldir'])) { + $dest = $att['baseinstalldir'] . DIRECTORY_SEPARATOR . + $file; + } else { + $dest = $file; + } + switch ($att['role']) { + case 'test': + case 'data': + if ($installed) { + break 2; + } + $dest = '-- will not be installed --'; + break; + case 'doc': + $dest = $this->config->get('doc_dir') . DIRECTORY_SEPARATOR . + $dest; + break; + case 'php': + default: + $dest = $this->config->get('php_dir') . DIRECTORY_SEPARATOR . + $dest; + } + $dest = preg_replace('!/+!', '/', $dest); + $file = preg_replace('!/+!', '/', $file); + $this->ui->tableRow(array($file, $dest)); } } $this->ui->endTable();

« previous php.pear.cvs (#4004) next »