Index: trunk/extensions/Contest/specials/SpecialMyContests.php |
— | — | @@ -275,24 +275,27 @@ |
276 | 276 | * @param ContestContestant $contestant |
277 | 277 | */ |
278 | 278 | protected function showSubmissionPage( ContestContestant $contestant ) { |
279 | | - if ( $this->getRequest()->getCheck( 'new' ) ) { |
280 | | - $this->showSuccess( 'contest-mycontests-signup-success', $contestant->getContest()->getField( 'name' ) ); |
| 279 | + $request = $this->getRequest(); |
| 280 | + $contest = $contestant->getContest(); |
| 281 | + if ( $request->getCheck( 'new' ) ) { |
| 282 | + $this->showSuccess( 'contest-mycontests-signup-success', $contest->getField( 'name' ) ); |
281 | 283 | } |
282 | | - else if ( $this->getRequest()->getCheck( 'added' ) ) { |
| 284 | + else if ( $request->getCheck( 'added' ) ) { |
283 | 285 | $this->showSuccess( 'contest-mycontests-addition-success' ); |
284 | 286 | } |
285 | | - else if ( $this->getRequest()->getCheck( 'updated' ) ) { |
| 287 | + else if ( $request->getCheck( 'updated' ) ) { |
286 | 288 | $this->showSuccess( 'contest-mycontests-updated-success' ); |
287 | 289 | } |
288 | | - else if ( $this->getRequest()->wasPosted() |
289 | | - && !$this->getUser()->matchEditToken( $this->getRequest()->getVal( 'wpEditToken' ) ) ) { |
| 290 | + else if ( $request->wasPosted() |
| 291 | + && !$this->getUser()->matchEditToken( $request->getVal( 'wpEditToken' ) ) ) { |
290 | 292 | $this->showError( 'contest-mycontests-sessionfail' ); |
291 | 293 | } |
292 | 294 | |
293 | | - $this->getOutput()->setPageTitle( $contestant->getContest()->getField( 'name' ) ); |
| 295 | + $output = $this->getOutput(); |
| 296 | + $output->setPageTitle( $contest->getField( 'name' ) ); |
294 | 297 | |
295 | | - $this->getOutput()->addHTML('<div style="clear:both;"></div>'); |
296 | | - $this->getOutput()->addWikiMsg( 'contest-submission-header', $contestant->getContest()->getField( 'name' ) ); |
| 298 | + $output->addHTML('<div style="clear:both;"></div>'); |
| 299 | + $output->addWikiMsg( 'contest-submission-header', $contest->getField( 'name' ) ); |
297 | 300 | |
298 | 301 | $form = new HTMLForm( $this->getFormFields( $contestant ), $this->getContext() ); |
299 | 302 | |
— | — | @@ -301,10 +304,10 @@ |
302 | 305 | |
303 | 306 | if( $form->show() ) { |
304 | 307 | $query = is_null( $this->submissionState ) ? '' : $this->submissionState; |
305 | | - $this->getOutput()->redirect( $this->getTitle( $contestant->getContest()->getField( 'name' ) )->getLocalURL( $query ) ); |
| 308 | + $output->redirect( $this->getTitle( $contest->getField( 'name' ) )->getLocalURL( $query ) ); |
306 | 309 | } |
307 | 310 | else { |
308 | | - $this->getOutput()->addModules( 'contest.special.submission' ); |
| 311 | + $output->addModules( 'contest.special.submission' ); |
309 | 312 | } |
310 | 313 | } |
311 | 314 | |