Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php |
— | — | @@ -138,7 +138,11 @@ |
139 | 139 | foreach ( $wgVectorModules as $module => $enable ) { |
140 | 140 | if ( isset( self::$modules[$module]['i18n'], self::$modules[$module]['preferences'] ) ) { |
141 | 141 | wfLoadExtensionMessages( self::$modules[$module]['i18n'] ); |
142 | | - foreach ( self::$modules[$module]['preferences'] as $preference ) { |
| 142 | + foreach ( self::$modules[$module]['preferences'] as $key => $preference ) { |
| 143 | + if ( $key == 'enable' && !$enable['user'] ) { |
| 144 | + continue; |
| 145 | + } |
| 146 | + |
143 | 147 | // The preference with the key 'enable' determines if the rest are even relevant, so in the future |
144 | 148 | // setting up some dependencies on that might make sense |
145 | 149 | $defaultPreferences[$preference['key']] = $preference['ui']; |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -422,7 +422,11 @@ |
423 | 423 | foreach ( $wgWikiEditorModules as $module => $enable ) { |
424 | 424 | if ( isset( self::$modules[$module]['i18n'], self::$modules[$module]['preferences'] ) ) { |
425 | 425 | wfLoadExtensionMessages( self::$modules[$module]['i18n'] ); |
426 | | - foreach ( self::$modules[$module]['preferences'] as $preference ) { |
| 426 | + foreach ( self::$modules[$module]['preferences'] as $key => $preference ) { |
| 427 | + if ( $key == 'enable' && !$enable['user'] ) { |
| 428 | + continue; |
| 429 | + } |
| 430 | + |
427 | 431 | // The preference with the key 'enable' determines if the rest are even relevant, so in the future |
428 | 432 | // setting up some dependencies on that might make sense |
429 | 433 | $defaultPreferences[$preference['key']] = $preference['ui']; |