-// Merges $_CONFIG with data in given array
-function mergeConfig ($newConfig) {
- global $_CONFIG;
- $_CONFIG = merge_array(getConfigArray(), $newConfig);
+// Init the config array
+function initConfig () {
+ // Init not if already found
+ if ((isset($GLOBALS['config'])) && (count($GLOBALS['config']) >= 3)) {
+ // Already initialized
+ trigger_error(sprintf("[%s:%s] Configuration is already initialized.", __FUNCTION__, __LINE__));
+ } // END - if
+
+ // Set a minimum dummy configuration
+ $GLOBALS['config'] = array(
+ 'code_length' => 0,
+ 'patch_level' => 0,
+ 'last_update' => time(),
+ 'DEBUG_MODE' => 'N',
+ 'DEBUG_RESET' => 'N',
+ 'DEBUG_MONTHLY' => 'N',
+ 'DEBUG_WEEKLY' => 'N',
+ 'DEBUG_REGEX' => 'N',
+ 'sql_count' => 0,
+ 'num_templates' => 0,
+ 'default_theme' => 'default',
+ );