diff options
Diffstat (limited to 'includes/specials/SpecialPreferences.php')
-rw-r--r-- | includes/specials/SpecialPreferences.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 946112bf..c6b2bb6b 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -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(); @@ -69,7 +68,7 @@ class SpecialPreferences extends SpecialPage { $htmlForm = new HTMLForm( array(), $this->getContext(), 'prefs-restore' ); - $htmlForm->setSubmitText( wfMsg( 'restoreprefs' ) ); + $htmlForm->setSubmitTextMsg( 'restoreprefs' ); $htmlForm->setTitle( $this->getTitle( 'reset' ) ); $htmlForm->setSubmitCallback( array( $this, 'submitReset' ) ); $htmlForm->suppressReset(); @@ -82,7 +81,7 @@ class SpecialPreferences extends SpecialPage { $user->resetOptions(); $user->saveSettings(); - $url = SpecialPage::getTitleFor( 'Preferences' )->getFullURL( 'success' ); + $url = $this->getTitle()->getFullURL( 'success' ); $this->getOutput()->redirect( $url ); |