Update oyejorge/less.php to 1.7.0.10
[lhc/web/wiklou.git] / includes / Preferences.php
index 096f8e3..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;
                                }
                        }
 
@@ -1006,6 +1005,11 @@ class Preferences {
                        'section' => 'watchlist/advancedwatchlist',
                        'label-message' => 'tog-watchlisthideliu',
                );
+               $defaultPreferences['watchlistreloadautomatically'] = array(
+                       'type' => 'toggle',
+                       'section' => 'watchlist/advancedwatchlist',
+                       'label-message' => 'tog-watchlistreloadautomatically',
+               );
 
                if ( $config->get( 'RCWatchCategoryMembership' ) ) {
                        $defaultPreferences['watchlisthidecategorization'] = array(
@@ -1269,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,
@@ -1466,7 +1470,7 @@ class Preferences {
                $res = self::tryFormSubmit( $formData, $form );
 
                if ( $res ) {
-                       $urlOptions = array( 'success' => 1 );
+                       $urlOptions = array();
 
                        if ( $res === 'eauth' ) {
                                $urlOptions['eauth'] = 1;
@@ -1476,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();