* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Install.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.4
+ * @version Release: 1.10.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
*
* @access public
*/
- function PEAR_Command_Install(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Common($ui, $config);
+ parent::__construct($ui, $config);
}
// }}}
if (!class_exists('PEAR_Downloader')) {
require_once 'PEAR/Downloader.php';
}
- $a = &new PEAR_Downloader($ui, $options, $config);
+ $a = new PEAR_Downloader($ui, $options, $config);
return $a;
}
if (!class_exists('PEAR_Installer')) {
require_once 'PEAR/Installer.php';
}
- $a = &new PEAR_Installer($ui);
+ $a = new PEAR_Installer($ui);
return $a;
}
$ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : '';
$zend_extension_line = 'zend_extension' . $debug . $ts;
$all = @file($filename);
- if (!$all) {
+ if ($all === false) {
return PEAR::raiseError('php.ini "' . $filename .'" could not be read');
}
$zend_extensions = $extensions = array();
$packrootphp_dir = $this->installer->_prependPath(
$this->config->get('php_dir', null, 'pear.php.net'),
$options['packagingroot']);
- $instreg = new PEAR_Registry($packrootphp_dir); // other instreg!
+ $metadata_dir = $this->config->get('metadata_dir', null, 'pear.php.net');
+ if ($metadata_dir) {
+ $metadata_dir = $this->installer->_prependPath(
+ $metadata_dir,
+ $options['packagingroot']);
+ }
+ $instreg = new PEAR_Registry($packrootphp_dir, false, false, $metadata_dir); // other instreg!
if ($this->config->get('verbose') > 2) {
$this->ui->outputData('using package root: ' . $options['packagingroot']);
if ($param->getPackageType() == 'extsrc' ||
$param->getPackageType() == 'extbin') {
$exttype = 'extension';
+ $extpath = $pinfo[1]['basename'];
} else {
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : '';
- $exttype = 'zend_extension' . $debug . $ts;
+ $exttype = 'zend_extension';
+ $extpath = $atts['installed_as'];
}
$extrainfo[] = 'You should add "' . $exttype . '=' .
- $pinfo[1]['basename'] . '" to php.ini';
+ $extpath . '" to php.ini';
} else {
$extrainfo[] = 'Extension ' . $instpkg->getProvidesExtension() .
' enabled in php.ini';
$dest .= DIRECTORY_SEPARATOR . $pkgname;
$orig = $pkgname . '-' . $pkgversion;
- $tar = &new Archive_Tar($pkgfile->getArchiveFile());
+ $tar = new Archive_Tar($pkgfile->getArchiveFile());
if (!$tar->extractModify($dest, $orig)) {
return $this->raiseError('unable to unpack ' . $pkgfile->getArchiveFile());
}
if (!isset($latestReleases[$channel])) {
// fill in cache for this channel
- $chan = &$reg->getChannel($channel);
+ $chan = $reg->getChannel($channel);
if (PEAR::isError($chan)) {
return $this->raiseError($chan);
}
return $ret;
}
-}
\ No newline at end of file
+}