r92749 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92748‎ | r92749 | r92750 >
Date:16:10, 21 July 2011
Author:jeroendedauw
Status:ok (Comments)
Tags:lamecommitsummary 
Comment:
fu r92382, don't use
Modified paths:
  • /trunk/extensions/UploadWizard/SpecialUploadCampaigns.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/SpecialUploadCampaigns.php
@@ -40,16 +40,16 @@
4141 * @param string $subPage, e.g. the "foo" in Special:UploadCampaigns/foo.
4242 */
4343 public function execute( $subPage ) {
 44+ global $wgRequest, $wgUser;
 45+
4446 $this->setHeaders();
4547 $this->outputHeader();
4648 $subPage = explode( '/', $subPage, 2 );
4749
4850 // If the user is authorized, display the page, if not, show an error.
49 - if ( $this->userCanExecute( $GLOBALS['wgUser'] ) ) {
50 - global $wgRequest;
51 -
 51+ if ( $this->userCanExecute( $wgUser ) ) {
5252 if ( $wgRequest->wasPosted()
53 - && $GLOBALS['wgUser']->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) )
 53+ && $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) )
5454 && $wgRequest->getCheck( 'newcampaign' ) ) {
5555 $this->getOutput()->redirect( SpecialPage::getTitleFor( 'UploadCampaign', $wgRequest->getVal( 'newcampaign' ) )->getLocalURL() );
5656 }
@@ -122,7 +122,8 @@
123123 'submit'
124124 ) );
125125
126 - $out->addHTML( Html::hidden( 'wpEditToken', $GLOBALS['wgUser']->editToken() ) );
 126+ global $wgUser;
 127+ $out->addHTML( Html::hidden( 'wpEditToken', $wgUser->editToken() ) );
127128
128129 $out->addHTML( '</fieldset></form>' );
129130 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92382added special page which will serve as admin interface for campaign configjeroendedauw20:59, 16 July 2011

Comments

#Comment by Nikerabbit (talk | contribs)   16:36, 21 July 2011

fu: don't use -m :)

#Comment by Jeroen De Dauw (talk | contribs)   16:57, 21 July 2011

I feel bashed now :)

Status & tagging log