Update oyejorge/less.php to 1.7.0.10
[lhc/web/wiklou.git] / includes / Preferences.php
index c7ab9cd..5f37e3f 100644 (file)
@@ -508,7 +508,6 @@ class Preferences {
                                                # Apply the same CSS class used on the input to the message:
                                                'cssclass' => $emailauthenticationclass,
                                        );
-                                       $defaultPreferences['emailaddress']['cssclass'] = $emailauthenticationclass;
                                }
                        }
 
@@ -1274,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,
@@ -1471,7 +1470,7 @@ class Preferences {
                $res = self::tryFormSubmit( $formData, $form );
 
                if ( $res ) {
-                       $urlOptions = array( 'success' => 1 );
+                       $urlOptions = array();
 
                        if ( $res === 'eauth' ) {
                                $urlOptions['eauth'] = 1;
@@ -1481,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();