Index: trunk/extensions/Contest/test/ContestValidationTests.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | class ContestValidationTests extends MediaWikiTestCase { |
14 | 14 | |
15 | 15 | /** |
16 | | - * Tests @see SpecialContestSubmission::validateSubmissionField |
| 16 | + * Tests @see SpecialMyContests::::validateSubmissionField |
17 | 17 | */ |
18 | 18 | public function testURLValidation() { |
19 | 19 | $tests = array( |
— | — | @@ -31,10 +31,10 @@ |
32 | 32 | |
33 | 33 | foreach ( $tests as $test => $isValdid ) { |
34 | 34 | if ( $isValdid ) { |
35 | | - $this->assertEquals( true, SpecialContestSubmission::validateSubmissionField( $test ) ); |
| 35 | + $this->assertEquals( true, SpecialMyContests::validateSubmissionField( $test ) ); |
36 | 36 | } |
37 | 37 | else { |
38 | | - $this->assertFalse( SpecialContestSubmission::validateSubmissionField( $test ) === true ); |
| 38 | + $this->assertFalse( SpecialMyContests::validateSubmissionField( $test ) === true ); |
39 | 39 | } |
40 | 40 | } |
41 | 41 | } |
Index: trunk/extensions/Contest/Contest.i18n.php |
— | — | @@ -54,7 +54,6 @@ |
55 | 55 | 'special-contest' => 'Contest', |
56 | 56 | 'special-contests' => 'Contests', |
57 | 57 | 'special-contestsignup' => 'Contest signup', |
58 | | - 'special-contestsubmission' => 'Contest submission', |
59 | 58 | 'special-contestwelcome' => 'Contest', |
60 | 59 | 'special-editcontest' => 'Edit contest', |
61 | 60 | 'special-mycontests' => 'Contests', |
— | — | @@ -139,12 +138,6 @@ |
140 | 139 | 'contest-submission-submission' => 'Url to your submission', |
141 | 140 | 'contest-submission-invalid-url' => 'This URL does not match one of the allowed formats.', |
142 | 141 | |
143 | | - // Special:ContestSubmission |
144 | | - 'contest-submission-submit' => 'Submit', |
145 | | - 'contest-submission-unknown' => 'There is no contest with the provided name.', |
146 | | - 'contest-submission-header' => 'On this page you can modify your submission until the deadline.', |
147 | | - 'contest-submission-finished' => 'This contest has ended.', |
148 | | - |
149 | 142 | // Special:Contest |
150 | 143 | 'contest-contest-title' => 'Contest: $1', |
151 | 144 | 'contest-contest-no-results' => 'There are no contestants to list.', |
— | — | @@ -198,6 +191,11 @@ |
199 | 192 | 'contest-mycontests-finished-text' => 'These are the passed contests you have participated in.', |
200 | 193 | 'contest-mycontests-header-contest' => 'Contest', |
201 | 194 | 'contest-mycontests-header-challenge' => 'Challenge', |
| 195 | + |
| 196 | + 'contest-submission-submit' => 'Submit', |
| 197 | + 'contest-submission-unknown' => 'There is no contest with the provided name.', |
| 198 | + 'contest-submission-header' => 'On this page you can modify your submission until the deadline.', |
| 199 | + 'contest-submission-finished' => 'This contest has ended.', |
202 | 200 | ); |
203 | 201 | |
204 | 202 | /** Message documentation (Message documentation) |
Index: trunk/extensions/Contest/specials/SpecialMyContests.php |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | $contest = $contestants[0]->getContest( array( 'status', 'name' ) ); |
67 | 67 | |
68 | 68 | if ( $contest->getField( 'status' ) == Contest::STATUS_ACTIVE ) { |
69 | | - $this->getOutput()->redirect( SpecialPage::getTitleFor( 'ContestSubmission', $contest->getField( 'name' ) )->getLocalURL() ); |
| 69 | + $this->getOutput()->redirect( $this->getTitle( $contest->getField( 'name' ) )->getLocalURL() ); |
70 | 70 | } |
71 | 71 | else { |
72 | 72 | $this->displayContestsTable( $contestants ); |
Index: trunk/extensions/Contest/specials/SpecialContestWelcome.php |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | } |
73 | 73 | |
74 | 74 | if ( $alreadySignedup ) { |
75 | | - $out->redirect( SpecialPage::getTitleFor( 'ContestSubmission', $contest->getField( 'name' ) )->getLocalURL() ); |
| 75 | + $out->redirect( SpecialPage::getTitleFor( 'MyContests', $contest->getField( 'name' ) )->getLocalURL() ); |
76 | 76 | } |
77 | 77 | else { |
78 | 78 | $out->setPageTitle( $contest->getField( 'name' ) ); |
Index: trunk/extensions/Contest/specials/SpecialContestSignup.php |
— | — | @@ -144,7 +144,7 @@ |
145 | 145 | $this->showSignupForm( $contest, $challengeId ); |
146 | 146 | } |
147 | 147 | else { |
148 | | - $out->redirect( SpecialPage::getTitleFor( 'ContestSubmission', $contest->getField( 'name' ) )->getLocalURL() ); |
| 148 | + $out->redirect( SpecialPage::getTitleFor( 'MyContests', $contest->getField( 'name' ) )->getLocalURL() ); |
149 | 149 | } |
150 | 150 | } |
151 | 151 | |
— | — | @@ -178,9 +178,7 @@ |
179 | 179 | * @param Contest $contest |
180 | 180 | */ |
181 | 181 | protected function showSucess( Contest $contest ) { |
182 | | - $out = $this->getOutput(); |
183 | | - |
184 | | - // TODO |
| 182 | + $this->getOutput()->redirect( SpecialPage::getTitleFor( 'MyContests', $contest->getField( 'name' ) )->getLocalURL() ); |
185 | 183 | } |
186 | 184 | |
187 | 185 | /** |
Index: trunk/extensions/Contest/api/ApiDeleteContest.php |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | public function getParamDescription() { |
70 | 70 | return array( |
71 | 71 | 'ids' => 'The IDs of the contests to delete', |
72 | | - 'token' => 'Edit token. You can get one of these through prop=info.', |
| 72 | + 'token' => 'Edit token, salted with the contest id', |
73 | 73 | ); |
74 | 74 | } |
75 | 75 | |