From: Alexandre Emsenhuber Date: Fri, 24 Apr 2009 07:46:19 +0000 (+0000) Subject: * Call SpecialPage::setHeaders() and SpecialPage::outputHeader() rather than doing... X-Git-Tag: 1.31.0-rc.0~42061 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=9920045d43e300750c83125032a08755b74debd8;p=lhc%2Fweb%2Fwiklou.git * Call SpecialPage::setHeaders() and SpecialPage::outputHeader() rather than doing this directly in $wgOut * Whitespaces tweaks --- diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 59deaec84e..900ac73f2c 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -8,9 +8,9 @@ class SpecialPreferences extends SpecialPage { function execute( $par ) { global $wgOut, $wgUser, $wgRequest; - $wgOut->setPageTitle( wfMsg( 'preferences' ) ); - $wgOut->setArticleRelated( false ); - $wgOut->setRobotPolicy( 'noindex,nofollow' ); + $this->setHeaders(); + $this->outputHeader(); + $wgOut->addScriptFile( 'prefs.js' ); $wgOut->disallowUserJs(); # Prevent hijacked user scripts from sniffing passwords etc. @@ -24,7 +24,7 @@ class SpecialPreferences extends SpecialPage { return; } - if ($par == 'reset') { + if ( $par == 'reset' ) { $this->showResetForm(); return; } @@ -60,7 +60,7 @@ class SpecialPreferences extends SpecialPage { global $wgUser, $wgOut; $wgUser->resetOptions(); - $url = SpecialPage::getTitleFor( 'Preferences')->getFullURL( 'success' ); + $url = SpecialPage::getTitleFor( 'Preferences' )->getFullURL( 'success' ); $wgOut->redirect( $url );