r44847 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44846‎ | r44847 | r44848 >
Date:15:59, 20 December 2008
Author:ialex
Status:ok
Tags:
Comment:
Changed behaviour of EXT_CONFIGURE_NO_EXTRACT constant (defined for manage.php maintenance script), will now not load current config rather that not extracting settings.
This is useful for people (like me) defining custom vars in $wgConf->settings to avoid lot of E_NOTICEs
Modified paths:
  • /trunk/extensions/Configure/Configure.obj.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Configure/Configure.obj.php
@@ -10,8 +10,8 @@
1111 protected $mHandler; // Configuration handler
1212 protected $mWiki; // Wiki name
1313 protected $mConf = array(); // Our array of settings
14 - protected $mOldSettings = null; // Old settings (before applying our overrides)
15 - protected $mDefaults = null; // Default values
 14+ protected $mOldSettings = null; // Old settings (before applying our overrides)
 15+ protected $mDefaults = null; // Default values
1616
1717 /**
1818 * Construct a new object.
@@ -32,6 +32,12 @@
3333 */
3434 public function initialise( $useCache = true ) {
3535 parent::initialise();
 36+
 37+ // Special case for manage.php maintenance script so that it can work
 38+ // even if the current configuration is broken
 39+ if ( defined( 'EXT_CONFIGURE_NO_EXTRACT' ) )
 40+ return;
 41+
3642 $this->mConf = $this->mHandler->getCurrent( $useCache );
3743
3844 # Restore first version of $this->settings if called a second time so
@@ -93,11 +99,6 @@
94100 * extract settings for this wiki in $GLOBALS
95101 */
96102 public function extract() {
97 - // Special case for manage.php maintenance script so that it can work
98 - // even if the current configuration is broken
99 - if ( defined( 'EXT_CONFIGURE_NO_EXTRACT' ) )
100 - return;
101 -
102103 // Include files before so that customized settings won't be overridden
103104 // by the default ones
104105 $this->includeFiles();

Status & tagging log