From: Andrew Garrett Date: Mon, 18 Aug 2008 12:50:30 +0000 (+0000) Subject: Allow use of +setting to add to that setting as it is (for arrays), rather than to... X-Git-Tag: 1.31.0-rc.0~45838 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=d475d6c2cbe9f88696848e6a1e2d34bcaf10b593;p=lhc%2Fweb%2Fwiklou.git Allow use of +setting to add to that setting as it is (for arrays), rather than to replace it. Together with the previous commit to this file, we don't need to use groupOverrides/groupOverrides2 anymore --- diff --git a/includes/SiteConfiguration.php b/includes/SiteConfiguration.php index 88d4133236..ddaaa589fa 100644 --- a/includes/SiteConfiguration.php +++ b/includes/SiteConfiguration.php @@ -178,7 +178,16 @@ class SiteConfiguration { function extractGlobal( $setting, $wiki, $suffix, $params, $wikiTags = array() ) { $value = $this->get( $setting, $wiki, $suffix, $params, $wikiTags ); if ( !is_null( $value ) ) { - $GLOBALS[$setting] = $value; + if (substr($setting,0,1) == '+' && is_array($value)) { + $setting = substr($setting,1); + if ( is_array($GLOBALS[$setting]) ) { + $GLOBALS[$setting] = array_merge( $GLOBALS[$setting], $value ); + } else { + $GLOBALS[$setting] = $value; + } + } else { + $GLOBALS[$setting] = $value; + } } }