Index: trunk/extensions/Contest/specials/SpecialContestWelcome.php |
— | — | @@ -38,11 +38,10 @@ |
39 | 39 | |
40 | 40 | $out = $this->getOutput(); |
41 | 41 | |
42 | | - $contest = Contest::s()->selectRow( null, array( 'name' => $subPage ) ); |
43 | | - |
44 | 42 | /** |
45 | 43 | * @var $contest Contest |
46 | 44 | */ |
| 45 | + $contest = Contest::s()->selectRow( null, array( 'name' => $subPage ) ); |
47 | 46 | |
48 | 47 | if ( $contest === false ) { |
49 | 48 | $this->showError( 'contest-welcome-unknown' ); |
— | — | @@ -50,7 +49,7 @@ |
51 | 50 | $out->returnToMain(); |
52 | 51 | } |
53 | 52 | else if ( ( $contest->getStatus() == Contest::STATUS_FINISHED ) || |
54 | | - ( $contest->getStatus() == Contest::STATUS_EXPIRED ) ) { |
| 53 | + ( $contest->getStatus() == Contest::STATUS_EXPIRED ) ) { |
55 | 54 | $this->showWarning( 'contest-signup-finished' ); |
56 | 55 | $out->addHTML( '<br /><br /><br /><br />' ); |
57 | 56 | $out->returnToMain(); |
— | — | @@ -132,9 +131,14 @@ |
133 | 132 | protected function addContestJS( Contest $contest ) { |
134 | 133 | $challenges = array(); |
135 | 134 | |
| 135 | + $output = $this->getOutput(); |
| 136 | + /** |
| 137 | + * @var $challenge ContestChallenge |
| 138 | + */ |
136 | 139 | foreach ( $contest->getChallenges() as /* ContestChallenge */ $challenge ) { |
137 | 140 | $data = $challenge->toArray(); |
138 | 141 | $data['target'] = $this->getSignupLink( $contest->getField( 'name' ), $challenge->getId() ); |
| 142 | + $data['text'] = $output->parse( $data['text'] ); |
139 | 143 | $challenges[] = $data; |
140 | 144 | } |
141 | 145 | |