Index: trunk/extensions/UploadWizard/SpecialUploadCampaigns.php |
— | — | @@ -40,16 +40,16 @@ |
41 | 41 | * @param string $subPage, e.g. the "foo" in Special:UploadCampaigns/foo. |
42 | 42 | */ |
43 | 43 | public function execute( $subPage ) { |
| 44 | + global $wgRequest, $wgUser; |
| 45 | + |
44 | 46 | $this->setHeaders(); |
45 | 47 | $this->outputHeader(); |
46 | 48 | $subPage = explode( '/', $subPage, 2 ); |
47 | 49 | |
48 | 50 | // 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 ) ) { |
52 | 52 | if ( $wgRequest->wasPosted() |
53 | | - && $GLOBALS['wgUser']->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ) |
| 53 | + && $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ) |
54 | 54 | && $wgRequest->getCheck( 'newcampaign' ) ) { |
55 | 55 | $this->getOutput()->redirect( SpecialPage::getTitleFor( 'UploadCampaign', $wgRequest->getVal( 'newcampaign' ) )->getLocalURL() ); |
56 | 56 | } |
— | — | @@ -122,7 +122,8 @@ |
123 | 123 | 'submit' |
124 | 124 | ) ); |
125 | 125 | |
126 | | - $out->addHTML( Html::hidden( 'wpEditToken', $GLOBALS['wgUser']->editToken() ) ); |
| 126 | + global $wgUser; |
| 127 | + $out->addHTML( Html::hidden( 'wpEditToken', $wgUser->editToken() ) ); |
127 | 128 | |
128 | 129 | $out->addHTML( '</fieldset></form>' ); |
129 | 130 | } |