r49797 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49796‎ | r49797 | r49798 >
Date:07:50, 24 April 2009
Author:ialex
Status:ok
Tags:
Comment:
and...
*Removed trailing whitespaces

(forgot to save the file before commiting :D)
Modified paths:
  • /trunk/phase3/includes/specials/SpecialPreferences.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialPreferences.php
@@ -4,26 +4,26 @@
55 function __construct() {
66 parent::__construct( 'Preferences' );
77 }
8 -
 8+
99 function execute( $par ) {
1010 global $wgOut, $wgUser, $wgRequest;
11 -
 11+
1212 $this->setHeaders();
1313 $this->outputHeader();
1414
1515 $wgOut->addScriptFile( 'prefs.js' );
1616
1717 $wgOut->disallowUserJs(); # Prevent hijacked user scripts from sniffing passwords etc.
18 -
 18+
1919 if ( $wgUser->isAnon() ) {
20 - $wgOut->showErrorPage( 'prefsnologin', 'prefsnologintext', array($this->getTitle()->getPrefixedDBkey()) );
 20+ $wgOut->showErrorPage( 'prefsnologin', 'prefsnologintext', array( $this->getTitle()->getPrefixedDBkey() ) );
2121 return;
2222 }
2323 if ( wfReadOnly() ) {
2424 $wgOut->readOnlyPage();
2525 return;
2626 }
27 -
 27+
2828 if ( $par == 'reset' ) {
2929 $this->showResetForm();
3030 return;
@@ -35,35 +35,35 @@
3636 'savedprefs'
3737 );
3838 }
39 -
 39+
4040 $htmlForm = Preferences::getFormObject( $wgUser );
4141
4242 $htmlForm->show();
4343 }
44 -
 44+
4545 function showResetForm() {
4646 global $wgOut;
47 -
 47+
4848 $wgOut->addWikiMsg( 'prefs-reset-intro' );
49 -
 49+
5050 $htmlForm = new HTMLForm( array(), 'prefs-restore' );
51 -
 51+
5252 $htmlForm->setSubmitText( wfMsg( 'restoreprefs' ) );
53 - $htmlForm->setTitle( $this->getTitle('reset') );
 53+ $htmlForm->setTitle( $this->getTitle( 'reset' ) );
5454 $htmlForm->setSubmitCallback( array( __CLASS__, 'submitReset' ) );
5555 $htmlForm->suppressReset();
56 -
 56+
5757 $htmlForm->show();
5858 }
59 -
 59+
6060 static function submitReset( $formData ) {
6161 global $wgUser, $wgOut;
6262 $wgUser->resetOptions();
63 -
 63+
6464 $url = SpecialPage::getTitleFor( 'Preferences' )->getFullURL( 'success' );
65 -
 65+
6666 $wgOut->redirect( $url );
67 -
 67+
6868 return true;
6969 }
7070 }

Status & tagging log