Merge "objectcache: make RedisBagOStuff pass all tests"
[lhc/web/wiklou.git] / includes / specials / SpecialPreferences.php
index 1cfcffa..0490cbb 100644 (file)
@@ -40,6 +40,8 @@ class SpecialPreferences extends SpecialPage {
 
        /**
         * Check if OOUI mode is enabled, by config or query string
+        *
+        * @since 1.32
         * @param IContextSource $context The context.
         * @return bool
         */
@@ -73,6 +75,7 @@ class SpecialPreferences extends SpecialPage {
                if ( $this->oouiEnabled ) {
                        $out->addModules( 'mediawiki.special.preferences.ooui' );
                        $out->addModuleStyles( 'mediawiki.special.preferences.styles.ooui' );
+                       $out->addModuleStyles( 'oojs-ui-widgets.styles' );
                } else {
                        $out->addModules( 'mediawiki.special.preferences' );
                        $out->addModuleStyles( 'mediawiki.special.preferences.styles' );
@@ -118,9 +121,6 @@ class SpecialPreferences extends SpecialPage {
                                ];
                        }
                        $out->addJsConfigVars( 'wgPreferencesTabs', $prefTabs );
-
-                       // TODO: Render fake tabs here to avoid FOUC.
-                       // $out->addHTML( $fakeTabs );
                } else {
 
                        $prefTabs = '';
@@ -163,7 +163,7 @@ class SpecialPreferences extends SpecialPage {
         * Get the preferences form to use.
         * @param User $user The user.
         * @param IContextSource $context The context.
-        * @return PreferencesForm|HTMLForm
+        * @return PreferencesFormLegacy|HTMLForm
         */
        protected function getFormObject( $user, IContextSource $context ) {
                $preferencesFactory = MediaWikiServices::getInstance()->getPreferencesFactory();
@@ -184,9 +184,7 @@ class SpecialPreferences extends SpecialPage {
 
                $context = new DerivativeContext( $this->getContext() );
                $context->setTitle( $this->getPageTitle( 'reset' ) ); // Reset subpage
-               $htmlForm = HTMLForm::factory(
-                       $this->oouiEnabled ? 'ooui' : 'vform', [], $context, 'prefs-restore'
-               );
+               $htmlForm = HTMLForm::factory( 'ooui', [], $context, 'prefs-restore' );
 
                $htmlForm->setSubmitTextMsg( 'restoreprefs' );
                $htmlForm->setSubmitDestructive();