From 7e7bbebda91b34e451f24c3641c433c3a376da79 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Mon, 16 May 2011 21:14:51 +0000 Subject: [PATCH] Add exposeGlobals() b/c stuff --- includes/conf/Conf.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/includes/conf/Conf.php b/includes/conf/Conf.php index 99dc38b39c..3544f20092 100755 --- a/includes/conf/Conf.php +++ b/includes/conf/Conf.php @@ -57,6 +57,20 @@ abstract class Conf { // @todo implement this: // $this->initExtensionDefaults(); $this->initChangedSettings(); + if( isset( $confConfig['exposeGlobals'] ) ) { + $this->exposeGlobals(); + } + } + + /** + * Expose all config variables as globals for back-compat. Ewwww. + */ + private function exposeGlobals() { + $allVars = $this->defaults + $this->extensionDefaults + $this->values; + foreach( $allVars as $name => $value ) { + $var = 'wg' . ucfirst( $name ); + $GLOBALS[$var] = $value; + } } /** -- 2.20.1