* Use local context to get message
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 19 Mar 2012 17:09:23 +0000 (17:09 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 19 Mar 2012 17:09:23 +0000 (17:09 +0000)
* Use $this->getTitle() instead of SpecialPage::getTitleFor( 'Preferences' )

includes/specials/SpecialPreferences.php

index 946112b..b69354c 100644 (file)
@@ -69,7 +69,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 +82,7 @@ class SpecialPreferences extends SpecialPage {
                $user->resetOptions();
                $user->saveSettings();
 
-               $url = SpecialPage::getTitleFor( 'Preferences' )->getFullURL( 'success' );
+               $url = $this->getTitle()->getFullURL( 'success' );
 
                $this->getOutput()->redirect( $url );