Revision 1295e769
Added by Scott Ullrich almost 15 years ago
etc/inc/config.lib.inc | ||
---|---|---|
90 | 90 |
* RESULT |
91 | 91 |
* $config - array containing all configuration variables |
92 | 92 |
******/ |
93 |
function parse_config($parse = false, $parse_extra = true) {
|
|
93 |
function parse_config($parse = false) { |
|
94 | 94 |
global $g, $config_parsed, $config_extra; |
95 | 95 |
|
96 | 96 |
$lockkey = lock('config'); |
... | ... | |
152 | 152 |
} |
153 | 153 |
generate_config_cache($config); |
154 | 154 |
} |
155 |
/* |
|
156 |
* This is used for external management system add-ons |
|
157 |
* allowing for example multiple configuration sections |
|
158 |
* from a remote management system that does not clobber |
|
159 |
* the system specific configuration. This routine |
|
160 |
* merges the extra configuration data into $config |
|
161 |
* and allows for external management systems to |
|
162 |
* automatically configure specific services, etc. |
|
163 |
*/ |
|
164 |
if(file_exists($g['conf_path'] . "/config.extra.xml") && $parse_extra) { |
|
165 |
if(file_exists($g['tmp_path'] . '/config.extra.cache')) { |
|
166 |
$config_extra = unserialize(file_get_contents($g['tmp_path'] . '/config.extra.cache')); |
|
167 |
} else { |
|
168 |
if($g['booting']) echo "."; |
|
169 |
$config_extra = parse_xml_config($g['conf_path'] . '/config.extra.xml', $g['xml_rootobj']); |
|
170 |
if($g['booting']) echo "."; |
|
171 |
$config = array_merge($config, $config_extra); |
|
172 |
if($g['booting']) echo "."; |
|
173 |
} |
|
174 |
} |
|
175 | 155 |
if($g['booting']) echo "."; |
176 | 156 |
alias_make_table($config); |
177 | 157 |
$config_parsed = true; |
Also available in: Unified diff
Remove config.extra.xml, I will just merge the remote configuration areas right into config.xml