made config cascade more flexible
This commit is contained in:
parent
1a6a1c042a
commit
cca94fbcfc
|
@ -5,7 +5,8 @@
|
|||
* This array configures the default locations of various files in the
|
||||
* DokuWiki directory hierarchy. It can be overriden in inc/preload.php
|
||||
*/
|
||||
$config_cascade = array(
|
||||
$config_cascade = array_merge(
|
||||
array(
|
||||
'main' => array(
|
||||
'default' => array(DOKU_CONF.'dokuwiki.php'),
|
||||
'local' => array(DOKU_CONF.'local.php'),
|
||||
|
@ -62,5 +63,7 @@ $config_cascade = array(
|
|||
'plainauth.users' => array(
|
||||
'default' => DOKU_CONF.'users.auth.php',
|
||||
),
|
||||
),
|
||||
$config_cascade
|
||||
);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ function delta_time($start=0) {
|
|||
define('DOKU_START_TIME', delta_time());
|
||||
|
||||
global $config_cascade;
|
||||
$config_cascade = '';
|
||||
$config_cascade = array();
|
||||
|
||||
// if available load a preload config file
|
||||
$preload = fullpath(dirname(__FILE__)).'/preload.php';
|
||||
|
@ -52,10 +52,9 @@ global $cache_authname;
|
|||
global $cache_metadata;
|
||||
$cache_metadata = array();
|
||||
|
||||
//set the configuration cascade - but only if its not already been set in preload.php
|
||||
if (empty($config_cascade)) {
|
||||
include(DOKU_INC.'inc/config_cascade.php');
|
||||
}
|
||||
// always include 'inc/config_cascade.php'
|
||||
// previously in preload.php set fields of $config_cascade will be merged with the defaults
|
||||
include(DOKU_INC.'inc/config_cascade.php');
|
||||
|
||||
//prepare config array()
|
||||
global $conf;
|
||||
|
|
Loading…
Reference in New Issue