* Use $this->getTitle() instead of SpecialPage::getTitleFor( 'Preferences' )
$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();
$user->resetOptions();
$user->saveSettings();
- $url = SpecialPage::getTitleFor( 'Preferences' )->getFullURL( 'success' );
+ $url = $this->getTitle()->getFullURL( 'success' );
$this->getOutput()->redirect( $url );