r114154 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114153‎ | r114154 | r114155 >
Date:17:09, 19 March 2012
Author:ialex
Status:ok
Tags:
Comment:
* Use local context to get message
* Use $this->getTitle() instead of SpecialPage::getTitleFor( 'Preferences' )
Modified paths:
  • /trunk/phase3/includes/specials/SpecialPreferences.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialPreferences.php
@@ -69,7 +69,7 @@
7070
7171 $htmlForm = new HTMLForm( array(), $this->getContext(), 'prefs-restore' );
7272
73 - $htmlForm->setSubmitText( wfMsg( 'restoreprefs' ) );
 73+ $htmlForm->setSubmitTextMsg( 'restoreprefs' );
7474 $htmlForm->setTitle( $this->getTitle( 'reset' ) );
7575 $htmlForm->setSubmitCallback( array( $this, 'submitReset' ) );
7676 $htmlForm->suppressReset();
@@ -82,7 +82,7 @@
8383 $user->resetOptions();
8484 $user->saveSettings();
8585
86 - $url = SpecialPage::getTitleFor( 'Preferences' )->getFullURL( 'success' );
 86+ $url = $this->getTitle()->getFullURL( 'success' );
8787
8888 $this->getOutput()->redirect( $url );
8989

Status & tagging log