diff options
author | Chris Smith <chris.eureka@jalakai.co.uk> | 2009-01-19 06:02:18 +0100 |
---|---|---|
committer | Chris Smith <chris.eureka@jalakai.co.uk> | 2009-01-19 06:02:18 +0100 |
commit | b303b92c45ac51a83bfe3eb519e8c7cedec64781 (patch) | |
tree | 3fc2edb05ee56a9a10a7781b5451054e0f52f804 /inc/confutils.php | |
parent | 10e43949456b8da1c4514f0eb674c306139df05b (diff) | |
download | rpg-b303b92c45ac51a83bfe3eb519e8c7cedec64781.tar.gz rpg-b303b92c45ac51a83bfe3eb519e8c7cedec64781.tar.bz2 |
Update for config cascade patch, fixes a couple of issues
darcs-hash:20090119050218-f07c6-8cb3615ee51fe81ef90b1e54675c359d84a2e57c.gz
Diffstat (limited to 'inc/confutils.php')
-rw-r--r-- | inc/confutils.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/inc/confutils.php b/inc/confutils.php index 77f058e0e..5b48e97dd 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -168,10 +168,13 @@ function retrieveConfig($type,$fn) { $combined = array(); if (!is_array($config_cascade[$type])) trigger_error('Missing config cascade for "'.$type.'"',E_USER_WARNING); - foreach ($config_cascade[$type] as $file) { - if (@file_exists($file)) { - $config = $fn($file); - $combined = array_merge($combined, $config); + foreach (array('default','local','protected') as $config_group) { + if (empty($config_cascade[$type][$config_group])) continue; + foreach ($config_cascade[$type][$config_group] as $file) { + if (@file_exists($file)) { + $config = $fn($file); + $combined = array_merge($combined, $config); + } } } |