http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88271
Revision: 88271
Author: demon
Date: 2011-05-16 21:14:51 +0000 (Mon, 16 May 2011)
Log Message:
-----------
Add exposeGlobals() b/c stuff
Modified Paths:
--------------
trunk/phase3/includes/conf/Conf.php
Modified: trunk/phase3/includes/conf/Conf.php
===================================================================
--- trunk/phase3/includes/conf/Conf.php 2011-05-16 21:04:55 UTC (rev 88270)
+++ trunk/phase3/includes/conf/Conf.php 2011-05-16 21:14:51 UTC (rev 88271)
@@ -57,9 +57,23 @@
// @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;
+ }
+ }
+
+ /**
* Load customized settings from whatever the data store is
*/
abstract protected function initChangedSettings();
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs