r45839 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45838‎ | r45839 | r45840 >
Date:16:19, 17 January 2009
Author:ialex
Status:deferred
Tags:
Comment:
Fixed "You are not allowed to read this setting" error for all settings on Special:Extensions when $wgConfigureEditableSettings is an non-empty array
Modified paths:
  • /trunk/extensions/Configure/CHANGELOG (modified) (history)
  • /trunk/extensions/Configure/Configure.php (modified) (history)
  • /trunk/extensions/Configure/Configure.settings.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Configure/CHANGELOG
@@ -1,6 +1,10 @@
22 This file lists changes on this extension.
33 Localisation updates are done on betawiki and aren't listed here.
44
 5+0.11.10 - 17 January 2009
 6+ Fixed "You are not allowed to read this setting" error for all settings on
 7+ Special:Extensions when $wgConfigureEditableSettings is an non-empty array.
 8+
59 0.11.9 - 16 January 2009
610 Added support for $wgNewPasswordExpiry.
711
Index: trunk/extensions/Configure/Configure.settings.php
@@ -210,8 +210,17 @@
211211 $notEditable = array_merge( $notEditable, $wgConf->getUneditableSettings() );
212212
213213 if ( !count( $wgConfigureNotEditableSettings ) && count( $wgConfigureEditableSettings ) ) {
214 - $wgConfigureNotEditableSettings = array_diff( array_keys( $this->getAllSettings() ), $wgConfigureEditableSettings );
 214+ // Only disallow core settings, not extensions settings!
 215+ $coreSettings = array();
 216+ foreach( $this->settings as $section ) {
 217+ foreach( $section as $group ) {
 218+ foreach( $group as $var => $type ) {
 219+ $coreSettings[] = $var;
 220+ }
 221+ }
215222 }
 223+ $wgConfigureNotEditableSettings = array_diff( $coreSettings, $wgConfigureEditableSettings );
 224+ }
216225
217226 $notEditable = array_merge( $notEditable,
218227 $wgConfigureNotEditableSettings );
Index: trunk/extensions/Configure/Configure.php
@@ -17,7 +17,7 @@
1818 'url' => 'http://www.mediawiki.org/wiki/Extension:Configure',
1919 'description' => 'Allow authorised users to configure the wiki via a web-based interface',
2020 'descriptionmsg' => 'configure-desc',
21 - 'version' => '0.11.9',
 21+ 'version' => '0.11.10',
2222 );
2323
2424 # Configuration part

Follow-up revisions

RevisionCommit summaryAuthorDate
r45842Backport r45839ialex16:43, 17 January 2009

Status & tagging log