Index: branches/REL1_14/extensions/Configure/Configure.obj.php |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | if( !is_array( $this->mDefaults ) ) { |
86 | 86 | $this->mDefaults = array(); |
87 | 87 | } |
88 | | - $allSettings = ConfigurationSettings::singleton( CONF_SETTINGS_BOTH )->getEditableSettings(); |
| 88 | + $allSettings = ConfigurationSettings::singleton( CONF_SETTINGS_CORE )->getEditableSettings(); |
89 | 89 | $allSettings += array_flip( $alwaysSnapshot ); |
90 | 90 | foreach( $allSettings as $setting => $type ) { |
91 | 91 | if( array_key_exists( $setting, $GLOBALS ) && |
Index: branches/REL1_14/extensions/Configure/Configure.page.php |
— | — | @@ -125,7 +125,7 @@ |
126 | 126 | protected function getSettingValue( $setting ) { |
127 | 127 | static $defaults; |
128 | 128 | |
129 | | - if (!$defaults) { |
| 129 | + if ( !$defaults ) { |
130 | 130 | global $wgConf; |
131 | 131 | $defaults = $wgConf->getDefaultsForWiki( $this->mWiki ); |
132 | 132 | } |
Index: branches/REL1_14/extensions/Configure/CHANGELOG |
— | — | @@ -1,6 +1,10 @@ |
2 | 2 | This file lists changes on this extension. |
3 | 3 | Localisation updates are done on betawiki and aren't listed here. |
4 | 4 | |
| 5 | +1.14 branch-3 - 21 January 2009 |
| 6 | + Fixed a bug on Special:Extensions, default settings values are now correctly |
| 7 | + displayed. |
| 8 | + |
5 | 9 | 1.14 branch-2 - 17 January 2009 |
6 | 10 | Fixed "You are not allowed to read this setting" error for all settings on |
7 | 11 | Special:Extensions when $wgConfigureEditableSettings is an non-empty array. |
Index: branches/REL1_14/extensions/Configure/Configure.settings.php |
— | — | @@ -194,7 +194,8 @@ |
195 | 195 | global $wgConf, $wgConfigureNotEditableSettings, $wgConfigureEditableSettings; |
196 | 196 | $notEditable = array_merge( $notEditable, $wgConf->getUneditableSettings() ); |
197 | 197 | |
198 | | - if ( !count( $wgConfigureNotEditableSettings ) && count( $wgConfigureEditableSettings ) ) { |
| 198 | + if ( !count( $wgConfigureNotEditableSettings ) && count( $wgConfigureEditableSettings ) && |
| 199 | + ( $this->types & CONF_SETTINGS_CORE ) == CONF_SETTINGS_CORE ) { |
199 | 200 | // Only disallow core settings, not extensions settings! |
200 | 201 | $coreSettings = array(); |
201 | 202 | foreach( $this->settings as $section ) { |
— | — | @@ -230,6 +231,12 @@ |
231 | 232 | foreach( $wgConfigureEditableSettings as $setting ) { |
232 | 233 | $this->cache['editable'][$setting] = $this->getSettingType( $setting ); |
233 | 234 | } |
| 235 | + // We'll need to add extensions settings |
| 236 | + if ( ( $this->types & CONF_SETTINGS_EXT ) == CONF_SETTINGS_EXT ) { |
| 237 | + foreach ( $this->getAllExtensionsObjects() as $ext ) { |
| 238 | + $this->cache['editable'] += $ext->getSettings(); |
| 239 | + } |
| 240 | + } |
234 | 241 | return $this->cache['editable']; |
235 | 242 | } |
236 | 243 | |
Index: branches/REL1_14/extensions/Configure/Configure.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Configure', |
19 | 19 | 'description' => 'Allow authorised users to configure the wiki via a web-based interface', |
20 | 20 | 'descriptionmsg' => 'configure-desc', |
21 | | - 'version' => '0.11.5 (1.14 branch-2)', |
| 21 | + 'version' => '0.11.5 (1.14 branch-3)', |
22 | 22 | ); |
23 | 23 | |
24 | 24 | # Configuration part |
Index: branches/REL1_14/extensions/Configure/SpecialExtensions.php |
— | — | @@ -96,7 +96,8 @@ |
97 | 97 | if( !$ext->isInstalled() ) continue; // must exist |
98 | 98 | $settings = $ext->getSettings(); |
99 | 99 | foreach ( $settings as $setting => $type ) { |
100 | | - if ( !isset( $GLOBALS[$setting] ) && !isset( $this->conf[$setting] ) && file_exists( $ext->getFile() ) ) { |
| 100 | + if ( !isset( $this->conf[$setting] ) && file_exists( $ext->getFile() ) ) { |
| 101 | + //echo "$setting<br/>\n"; |
101 | 102 | if ( !$globalDone ) { |
102 | 103 | extract( $GLOBALS, EXTR_REFS ); |
103 | 104 | global $wgHooks; |
— | — | @@ -105,14 +106,14 @@ |
106 | 107 | $globalDone = true; |
107 | 108 | } |
108 | 109 | require_once( $ext->getFile() ); |
109 | | - if ( isset( $GLOBALS[$setting] ) ) |
110 | | - $this->conf[$setting] = $GLOBALS[$setting]; |
| 110 | + if ( isset( $$setting ) ) |
| 111 | + $this->conf[$setting] = $$setting; |
111 | 112 | } |
112 | 113 | } |
113 | 114 | $ext->setPageObj( $this ); |
114 | 115 | $ret .= $ext->getHtml(); |
115 | 116 | } |
116 | | - if ( isset( $oldHooks ) ) |
| 117 | + if ( $globalDone ) |
117 | 118 | $GLOBALS['wgHooks'] = $oldHooks; |
118 | 119 | return $ret; |
119 | 120 | } |