Index: trunk/extensions/Contest/Contest.i18n.php |
— | — | @@ -195,6 +195,7 @@ |
196 | 196 | 'contest-mycontests-header-contest' => 'Contest', |
197 | 197 | 'contest-mycontests-header-challenge' => 'Challenge', |
198 | 198 | 'contest-mycontests-signup-success' => 'You have successfully signed up for this contest.', |
| 199 | + 'contest-mycontests-sessionfail' => 'Your submission could not be saved due to loss of session data. Please try again.', |
199 | 200 | |
200 | 201 | 'contest-submission-submit' => 'Submit', |
201 | 202 | 'contest-submission-unknown' => 'There is no contest with the provided name.', |
Index: trunk/extensions/Contest/specials/SpecialMyContests.php |
— | — | @@ -36,8 +36,7 @@ |
37 | 37 | return; |
38 | 38 | } |
39 | 39 | |
40 | | - if ( $this->getRequest()->wasPosted() |
41 | | - && $this->getUser()->matchEditToken( $this->getRequest()->getVal( 'wpEditToken' ) ) ) { |
| 40 | + if ( $this->getRequest()->wasPosted() ) { |
42 | 41 | $contestant = ContestContestant::s()->selectRow( null, array( 'id' => $this->getRequest()->getInt( 'wpcontestant-id' ) ) ); |
43 | 42 | $this->showSubmissionPage( $contestant ); |
44 | 43 | } |
— | — | @@ -239,6 +238,10 @@ |
240 | 239 | if ( $this->getRequest()->getCheck( 'new' ) ) { |
241 | 240 | $this->showSuccess( 'contest-mycontests-signup-success' ); |
242 | 241 | } |
| 242 | + else if ( $this->getRequest()->wasPosted() |
| 243 | + && !$this->getUser()->matchEditToken( $this->getRequest()->getVal( 'wpEditToken' ) ) ) { |
| 244 | + $this->showError( 'contest-mycontests-sessionfail' ); |
| 245 | + } |
243 | 246 | |
244 | 247 | $this->getOutput()->setPageTitle( $contestant->getContest()->getField( 'name' ) ); |
245 | 248 | |