Merge "rebuildLocalisationCache: Implement --lang option"
[lhc/web/wiklou.git] / includes / specials / SpecialPreferences.php
index b69354c..a50e7c1 100644 (file)
@@ -39,8 +39,7 @@ class SpecialPreferences extends SpecialPage {
 
                $user = $this->getUser();
                if ( $user->isAnon() ) {
-                       $out->showErrorPage( 'prefsnologin', 'prefsnologintext', array( $this->getTitle()->getPrefixedDBkey() ) );
-                       return;
+                       throw new ErrorPageError( 'prefsnologin', 'prefsnologintext', array( $this->getTitle()->getPrefixedDBkey() ) );
                }
                $this->checkReadOnly();
 
@@ -79,7 +78,7 @@ class SpecialPreferences extends SpecialPage {
 
        public function submitReset( $formData ) {
                $user = $this->getUser();
-               $user->resetOptions();
+               $user->resetOptions( 'all' );
                $user->saveSettings();
 
                $url = $this->getTitle()->getFullURL( 'success' );
@@ -88,4 +87,8 @@ class SpecialPreferences extends SpecialPage {
 
                return true;
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }