From: Andrew Garrett Date: Wed, 20 Aug 2008 12:56:59 +0000 (+0000) Subject: Add "+setting" type code (adding to the existing global) into getAll, since that... X-Git-Tag: 1.31.0-rc.0~45776 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=8736d07448cc6718c2f58961b080f1fc284efc28;p=lhc%2Fweb%2Fwiklou.git Add "+setting" type code (adding to the existing global) into getAll, since that is what we use on Wikimedia --- 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;