r45968 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45967‎ | r45968 | r45969 >
Date:19:50, 21 January 2009
Author:ialex
Status:deferred
Tags:
Comment:
* Fix for r45967, include extensions settings in ConfigurationSettings::getEditableSettings() even when $wgConfigureEditableSettings is non-empty
* Only snapshot core settings in WebConfiguration::snapshotDefaults()
* Whitespaces tweaks
Modified paths:
  • /trunk/extensions/Configure/Configure.obj.php (modified) (history)
  • /trunk/extensions/Configure/Configure.page.php (modified) (history)
  • /trunk/extensions/Configure/Configure.settings.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Configure/Configure.obj.php
@@ -88,7 +88,7 @@
8989 if( !is_array( $this->mDefaults ) ) {
9090 $this->mDefaults = array();
9191 }
92 - $settings = ConfigurationSettings::singleton( CONF_SETTINGS_BOTH )->getSnapshotSettings();
 92+ $settings = ConfigurationSettings::singleton( CONF_SETTINGS_CORE )->getSnapshotSettings();
9393 foreach( $settings as $setting ) {
9494 if( array_key_exists( $setting, $GLOBALS ) &&
9595 !( $noOverride && array_key_exists( $setting, $this->mDefaults ) ) )
Index: trunk/extensions/Configure/Configure.page.php
@@ -125,7 +125,7 @@
126126 protected function getSettingValue( $setting ) {
127127 static $defaults;
128128
129 - if (!$defaults) {
 129+ if ( !$defaults ) {
130130 global $wgConf;
131131 $defaults = $wgConf->getDefaultsForWiki( $this->mWiki );
132132 }
Index: trunk/extensions/Configure/Configure.settings.php
@@ -209,7 +209,8 @@
210210 global $wgConf, $wgConfigureNotEditableSettings, $wgConfigureEditableSettings;
211211 $notEditable = array_merge( $notEditable, $wgConf->getUneditableSettings() );
212212
213 - if ( !count( $wgConfigureNotEditableSettings ) && count( $wgConfigureEditableSettings ) ) {
 213+ if ( !count( $wgConfigureNotEditableSettings ) && count( $wgConfigureEditableSettings ) &&
 214+ ( $this->types & CONF_SETTINGS_CORE ) == CONF_SETTINGS_CORE ) {
214215 // Only disallow core settings, not extensions settings!
215216 $coreSettings = array();
216217 foreach( $this->settings as $section ) {
@@ -249,6 +250,12 @@
250251 foreach( $wgConfigureEditableSettings as $setting ) {
251252 $this->cache['editable'][$setting] = $this->getSettingType( $setting );
252253 }
 254+ // We'll need to add extensions settings
 255+ if ( ( $this->types & CONF_SETTINGS_EXT ) == CONF_SETTINGS_EXT ) {
 256+ foreach ( $this->getAllExtensionsObjects() as $ext ) {
 257+ $this->cache['editable'] += $ext->getSettings();
 258+ }
 259+ }
253260 return $this->cache['editable'];
254261 }
255262

Follow-up revisions

RevisionCommit summaryAuthorDate
r45976Backport r45967, r45968 and r45975ialex20:57, 21 January 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r45967Fixed a bug on Special:Extensions, default settings values are now correctly ...ialex16:07, 21 January 2009

Status & tagging log