mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Write the PEAR system config file while installing
This commit is contained in:
parent
6f14374b3b
commit
6ca92fbaa6
@ -1,8 +1,5 @@
|
||||
<?php
|
||||
|
||||
// XXX TODO write the config file at the end as for example
|
||||
// in 'system' layer
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$pear_dir = dirname(__FILE__);
|
||||
@ -112,6 +109,18 @@ foreach ($install_files as $package => $instfile) {
|
||||
$new_ver = $reg->packageInfo($package, 'version');
|
||||
$ui->outputData(sprintf("[PEAR] %-15s- installed: %s", $package, $new_ver));
|
||||
}
|
||||
if ($package == 'PEAR') {
|
||||
if (is_file($ufile = $config->getConfFile('user'))) {
|
||||
$ui->outputData('Warning! a PEAR user config file already exists from ' .
|
||||
'a previous PEAR installation at ' .
|
||||
"'$ufile'. You may probably want to remove it.");
|
||||
}
|
||||
$ui->outputData('Writing PEAR system config file at: ' . $config->files['system']);
|
||||
$ui->outputData('You may want to add: ' . $config->get('php_dir') . ' to your php.ini include_path');
|
||||
foreach ($config->getKeys() as $key) {
|
||||
$data[$key] = $config->get($key);
|
||||
}
|
||||
$config->store('system', $data);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user