r49796 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49795‎ | r49796 | r49797 >
Date:07:46, 24 April 2009
Author:ialex
Status:ok
Tags:
Comment:
* Call SpecialPage::setHeaders() and SpecialPage::outputHeader() rather than doing this directly in $wgOut
* Whitespaces tweaks
Modified paths:
  • /trunk/phase3/includes/specials/SpecialPreferences.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialPreferences.php
@@ -8,9 +8,9 @@
99 function execute( $par ) {
1010 global $wgOut, $wgUser, $wgRequest;
1111
12 - $wgOut->setPageTitle( wfMsg( 'preferences' ) );
13 - $wgOut->setArticleRelated( false );
14 - $wgOut->setRobotPolicy( 'noindex,nofollow' );
 12+ $this->setHeaders();
 13+ $this->outputHeader();
 14+
1515 $wgOut->addScriptFile( 'prefs.js' );
1616
1717 $wgOut->disallowUserJs(); # Prevent hijacked user scripts from sniffing passwords etc.
@@ -24,7 +24,7 @@
2525 return;
2626 }
2727
28 - if ($par == 'reset') {
 28+ if ( $par == 'reset' ) {
2929 $this->showResetForm();
3030 return;
3131 }
@@ -60,7 +60,7 @@
6161 global $wgUser, $wgOut;
6262 $wgUser->resetOptions();
6363
64 - $url = SpecialPage::getTitleFor( 'Preferences')->getFullURL( 'success' );
 64+ $url = SpecialPage::getTitleFor( 'Preferences' )->getFullURL( 'success' );
6565
6666 $wgOut->redirect( $url );
6767

Status & tagging log