From d475d6c2cbe9f88696848e6a1e2d34bcaf10b593 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Mon, 18 Aug 2008 12:50:30 +0000 Subject: [PATCH] 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 --- includes/SiteConfiguration.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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; + } } } -- 2.20.1