X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialPreferences.php;h=a5c24e7b1e4f077247b00e5f4846018958e49974;hb=5dc68aedf45a7b2de6d6c6e736f9014873aa8186;hp=7c55e5c8cb93dc51f4ccfba1b916360d1e350023;hpb=f428f95ac49e71bde47bc982e31ff60b3ef41706;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 7c55e5c8cb..a5c24e7b1e 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -21,6 +21,8 @@ * @ingroup SpecialPage */ +use MediaWiki\MediaWikiServices; + /** * A special page that allows users to change their preferences * @@ -82,7 +84,6 @@ class SpecialPreferences extends SpecialPage { } $htmlForm = $this->getFormObject( $user, $this->getContext() ); - $htmlForm->setSubmitCallback( [ 'Preferences', 'tryUISubmit' ] ); $sectionTitles = $htmlForm->getPreferenceSections(); $prefTabs = ''; @@ -124,10 +125,12 @@ class SpecialPreferences extends SpecialPage { * @return PreferencesForm|HTMLForm */ protected function getFormObject( $user, IContextSource $context ) { - return Preferences::getFormObject( $user, $context ); + $preferencesFactory = MediaWikiServices::getInstance()->getPreferencesFactory(); + $form = $preferencesFactory->getForm( $user, $context ); + return $form; } - private function showResetForm() { + protected function showResetForm() { if ( !$this->getUser()->isAllowed( 'editmyoptions' ) ) { throw new PermissionsError( 'editmyoptions' ); }