From 8736d07448cc6718c2f58961b080f1fc284efc28 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Wed, 20 Aug 2008 12:56:59 +0000 Subject: [PATCH] Add "+setting" type code (adding to the existing global) into getAll, since that is what we use on Wikimedia --- includes/SiteConfiguration.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/includes/SiteConfiguration.php b/includes/SiteConfiguration.php index 0ed768791c..9d091097f1 100644 --- a/includes/SiteConfiguration.php +++ b/includes/SiteConfiguration.php @@ -121,9 +121,18 @@ class SiteConfiguration { function getAll( $wiki, $suffix, $params, $wikiTags = array() ) { $localSettings = array(); foreach ( $this->settings as $varname => $stuff ) { + $append = false; + $var = $varname; + if ( substr( $varname, 0, 1 ) == '+' ) { + $append = true; + $var = substr( $varname, 1 ); + } + $value = $this->get( $varname, $wiki, $suffix, $params, $wikiTags ); + if ( $append && is_array($value) && is_array( $GLOBALS[$var] ) ) + $value = array_merge( $value, $GLOBALS[$var] ); if ( !is_null( $value ) ) { - $localSettings[$varname] = $value; + $localSettings[$var] = $value; } } return $localSettings; -- 2.20.1