X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialPreferences.php;h=c6b2bb6b9d6bb4a2ce8fed9ea68d3ee1e1c9ab02;hb=27757a7fdd3c6ffb56c470af7097c4c28cd4632d;hp=59deaec84ef903dfe9262f633c2e1593604c0940;hpb=155ddf6de4a2aa68dcdd8ca7d0f9db21ced4b228;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 59deaec84e..c6b2bb6b9d 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -1,69 +1,90 @@ setPageTitle( wfMsg( 'preferences' ) ); - $wgOut->setArticleRelated( false ); - $wgOut->setRobotPolicy( 'noindex,nofollow' ); - $wgOut->addScriptFile( 'prefs.js' ); - - $wgOut->disallowUserJs(); # Prevent hijacked user scripts from sniffing passwords etc. - - if ( $wgUser->isAnon() ) { - $wgOut->showErrorPage( 'prefsnologin', 'prefsnologintext', array($this->getTitle()->getPrefixedDBkey()) ); - return; - } - if ( wfReadOnly() ) { - $wgOut->readOnlyPage(); - return; + + public function execute( $par ) { + $this->setHeaders(); + $this->outputHeader(); + $out = $this->getOutput(); + $out->disallowUserJs(); # Prevent hijacked user scripts from sniffing passwords etc. + + $user = $this->getUser(); + if ( $user->isAnon() ) { + throw new ErrorPageError( 'prefsnologin', 'prefsnologintext', array( $this->getTitle()->getPrefixedDBkey() ) ); } - - if ($par == 'reset') { + $this->checkReadOnly(); + + if ( $par == 'reset' ) { $this->showResetForm(); return; } - if ( $wgRequest->getCheck( 'success' ) ) { - $wgOut->wrapWikiMsg( - '