X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FPreferences.php;h=5f37e3f75d2454dd8f54eb2cada9c4b58ac23ef0;hb=fa7279c78d5b8460668d293e5fac226689bccdb5;hp=327d19ae37dfdc277bdd4b084a5d03466ef3540b;hpb=959c749a6ae4eab84c73ac70210a2c6b94d38e93;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Preferences.php b/includes/Preferences.php index 327d19ae37..5f37e3f75d 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -1273,7 +1273,7 @@ class Preferences { * @param IContextSource $context * @param string $formClass * @param array $remove Array of items to remove - * @return HtmlForm + * @return PreferencesForm|HtmlForm */ static function getFormObject( $user, @@ -1470,7 +1470,7 @@ class Preferences { $res = self::tryFormSubmit( $formData, $form ); if ( $res ) { - $urlOptions = array( 'success' => 1 ); + $urlOptions = array(); if ( $res === 'eauth' ) { $urlOptions['eauth'] = 1; @@ -1480,7 +1480,11 @@ class Preferences { $url = $form->getTitle()->getFullURL( $urlOptions ); - $form->getContext()->getOutput()->redirect( $url ); + $context = $form->getContext(); + // Set session data for the success message + $context->getRequest()->setSessionData( 'specialPreferencesSaveSuccess', 1 ); + + $context->getOutput()->redirect( $url ); } return Status::newGood();