cvs: pear-core /PEAR Config.php
| From: | Greg Beaver | Date: | Wed, 03 Nov 2004 22:10:25 +0000 |
| Subject: | cvs: pear-core /PEAR Config.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-1217@lists.php.net to get a copy of this message | ||
cellog Wed Nov 3 17:10:25 2004 EDT
Modified files:
/pear-core/PEAR Config.php
Log:
add the option to specify the remote configuration ftp file
inside the configuration itself
http://cvs.php.net/diff.php/pear-core/PEAR/Config.php?r1=1.62&r2=1.63&ty=u
Index: pear-core/PEAR/Config.php
diff -u pear-core/PEAR/Config.php:1.62 pear-core/PEAR/Config.php:1.63
--- pear-core/PEAR/Config.php:1.62 Sun Oct 31 14:27:42 2004
+++ pear-core/PEAR/Config.php Wed Nov 3 17:10:23 2004
@@ -17,7 +17,7 @@
// | Greg Beaver <cellog@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Config.php,v 1.62 2004/10/31 19:27:42 cellog Exp $
+// $Id: Config.php,v 1.63 2004/11/03 22:10:23 cellog Exp $
require_once 'PEAR.php';
require_once 'PEAR/Registry.php';
@@ -282,6 +282,13 @@
'prompt' => 'Default Channel',
'group' => 'Internet Access',
),
+ 'remote_config' => array(
+ 'type' => 'string',
+ 'default' => '',
+ 'doc' => 'ftp url of remote configuration file to use for
synchronized install',
+ 'prompt' => 'Remote Configuration File',
+ 'group' => 'Internet Access',
+ ),
'auto_discover' => array(
'type' => 'integer',
'default' => 0,
@@ -482,15 +489,18 @@
$this->layers = array_keys($this->configuration);
$this->files['user'] = $user_file;
$this->files['system'] = $system_file;
- if ($ftp_file) {
- $this->readFTPConfigFile($ftp_file);
- }
if ($user_file && file_exists($user_file)) {
$this->readConfigFile($user_file);
}
if ($system_file && file_exists($system_file)) {
$this->mergeConfigFile($system_file, false, 'system');
}
+ if (!$ftp_file) {
+ $ftp_file = $this->get('remote_config');
+ }
+ if ($ftp_file) {
+ $this->readFTPConfigFile($ftp_file);
+ }
foreach ($this->configuration_info as $key => $info) {
$this->configuration['default'][$key] = $info['default'];
}