X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialPreferences.php;h=ba5a57ea5a830b30745ffe42eb4a2651e7998fc6;hb=17e88d99eb768e4181207bbd35656d239ef5d4e8;hp=40b50ea5bf464a08ad3c3c721a15e854ac7c53e7;hpb=4d609f015dd64528e772bbaa088d378aa26334eb;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 40b50ea5bf..ba5a57ea5a 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -81,7 +81,7 @@ class SpecialPreferences extends SpecialPage { $user = $this->getUser(); } - $htmlForm = Preferences::getFormObject( $user, $this->getContext() ); + $htmlForm = $this->getFormObject( $user, $this->getContext() ); $htmlForm->setSubmitCallback( [ 'Preferences', 'tryUISubmit' ] ); $sectionTitles = $htmlForm->getPreferenceSections(); @@ -117,6 +117,16 @@ class SpecialPreferences extends SpecialPage { $htmlForm->show(); } + /** + * Get the preferences form to use. + * @param User $user The user. + * @param IContextSource $context The context. + * @return PreferencesForm|HtmlForm + */ + protected function getFormObject( $user, IContextSource $context ) { + return Preferences::getFormObject( $user, $context ); + } + private function showResetForm() { if ( !$this->getUser()->isAllowed( 'editmyoptions' ) ) { throw new PermissionsError( 'editmyoptions' );