X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialPreferences.php;h=d541eadcd6b3aa5cd02212def09a16d4f97eecaa;hp=04be22b92d5af1945f6b8cada1e14d73471856eb;hb=a1ef77b2d80830fbcb617a83961d78cff9d6e384;hpb=3d98b80a3901a4f843af38066f4f1538ec635976 diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 04be22b92d..d541eadcd6 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -53,7 +53,10 @@ class SpecialPreferences extends SpecialPage { } $out->addModules( 'mediawiki.special.preferences.ooui' ); - $out->addModuleStyles( 'mediawiki.special.preferences.styles.ooui' ); + $out->addModuleStyles( [ + 'mediawiki.special.preferences.styles.ooui', + 'mediawiki.widgets.TagMultiselectWidget.styles', + ] ); $out->addModuleStyles( 'oojs-ui-widgets.styles' ); $session = $this->getRequest()->getSession(); @@ -103,7 +106,7 @@ class SpecialPreferences extends SpecialPage { * Get the preferences form to use. * @param User $user The user. * @param IContextSource $context The context. - * @return PreferencesFormLegacy|HTMLForm + * @return PreferencesFormOOUI|HTMLForm */ protected function getFormObject( $user, IContextSource $context ) { $preferencesFactory = MediaWikiServices::getInstance()->getPreferencesFactory(); @@ -112,7 +115,10 @@ class SpecialPreferences extends SpecialPage { } protected function showResetForm() { - if ( !$this->getUser()->isAllowed( 'editmyoptions' ) ) { + if ( !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $this->getUser(), 'editmyoptions' ) + ) { throw new PermissionsError( 'editmyoptions' ); } @@ -131,7 +137,10 @@ class SpecialPreferences extends SpecialPage { } public function submitReset( $formData ) { - if ( !$this->getUser()->isAllowed( 'editmyoptions' ) ) { + if ( !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $this->getUser(), 'editmyoptions' ) + ) { throw new PermissionsError( 'editmyoptions' ); }