Index: trunk/extensions/Contest/specials/SpecialMyContests.php |
— | — | @@ -194,7 +194,7 @@ |
195 | 195 | case Contest::STATUS_FINISHED: |
196 | 196 | $this->showWarning( 'contest-submission-finished' ); |
197 | 197 | $out->addHTML( '<br /><br /><br /><br />' ); |
198 | | - $out->returnToMain(); |
| 198 | + $out->returnToMain(); |
199 | 199 | break; |
200 | 200 | } |
201 | 201 | } |
— | — | @@ -209,7 +209,7 @@ |
210 | 210 | */ |
211 | 211 | protected function handleEnabledPage( Contest $contest ) { |
212 | 212 | // Check if the user is already a contestant in this contest. |
213 | | - // If he is, reirect to submission page, else show signup form. |
| 213 | + // If he is, redirect to submission page, else show signup form. |
214 | 214 | $contestant = ContestContestant::s()->selectRow( |
215 | 215 | null, |
216 | 216 | array( |
— | — | @@ -235,7 +235,7 @@ |
236 | 236 | * @param ContestContestant $contestant |
237 | 237 | */ |
238 | 238 | protected function showSubmissionPage( ContestContestant $contestant ) { |
239 | | - // TODO: redirects with fragment apparenelt don't work - need other solution here |
| 239 | + // TODO: redirects with fragment apparently don't work - need other solution here |
240 | 240 | if ( $this->getTitle()->getFragment() == 'new' ) { |
241 | 241 | $this->showSuccess( 'contest-mycontests-signup-success' ); |
242 | 242 | } |
Index: trunk/extensions/Contest/specials/SpecialContestant.php |
— | — | @@ -41,7 +41,8 @@ |
42 | 42 | } |
43 | 43 | else { |
44 | 44 | if ( $this->getRequest()->wasPosted() |
45 | | - && $this->getUser()->matchEditToken( $this->getRequest()->getVal( 'wpEditToken' ) ) ) { |
| 45 | + && $this->getUser()->matchEditToken( $this->getRequest()->getVal( 'wpEditToken' ) ) ) |
| 46 | + { |
46 | 47 | $this->handleSubmission( $contestant ); |
47 | 48 | } |
48 | 49 | |
— | — | @@ -75,7 +76,7 @@ |
76 | 77 | |
77 | 78 | if ( $success ) { |
78 | 79 | ContestContestant::s()->addToField( 'comments', 1 ); |
79 | | - } |
| 80 | + } |
80 | 81 | } |
81 | 82 | |
82 | 83 | if ( $success && !is_null( $this->getRequest()->getVal( 'contestant-rating' ) ) ) { |
— | — | @@ -174,7 +175,7 @@ |
175 | 176 | $stats['challenge'] = htmlspecialchars( $challengeTitles[$contestant->getField( 'challenge_id' )] ); |
176 | 177 | |
177 | 178 | if ( $contestant->getField( 'submission' ) === '' ) { |
178 | | - $stats['submission'] = wfMsg( 'contest-contestant-notsubmitted' ); |
| 179 | + $stats['submission'] = htmlspecialchars( wfMsg( 'contest-contestant-notsubmitted' ) ); |
179 | 180 | } |
180 | 181 | else { |
181 | 182 | $stats['submission'] = '<b>' . Html::element( |
— | — | @@ -187,17 +188,17 @@ |
188 | 189 | $countries = ContestContestant::getCountries(); |
189 | 190 | $stats['country'] = htmlspecialchars( $countries[$contestant->getField( 'country' )] ); |
190 | 191 | |
191 | | - $stats['wmf'] = wfMsg( 'contest-contestant-' . ( $contestant->getField( 'wmf' ) ? 'yes' : 'no' ) ); |
192 | | - $stats['volunteer'] = wfMsg( 'contest-contestant-' . ( $contestant->getField( 'volunteer' ) ? 'yes' : 'no' ) ); |
| 192 | + $stats['wmf'] = htmlspecialchars( wfMsg( 'contest-contestant-' . ( $contestant->getField( 'wmf' ) ? 'yes' : 'no' ) ) ); |
| 193 | + $stats['volunteer'] = htmlspecialchars( wfMsg( 'contest-contestant-' . ( $contestant->getField( 'volunteer' ) ? 'yes' : 'no' ) ) ); |
193 | 194 | |
194 | | - $stats['rating'] = wfMsgExt( |
| 195 | + $stats['rating'] = htmlspecialchars( wfMsgExt( |
195 | 196 | 'contest-contestant-rating', |
196 | 197 | 'parsemag', |
197 | 198 | $this->getLang()->formatNum( $contestant->getField( 'rating' ) ), |
198 | 199 | $this->getLang()->formatNum( $contestant->getField( 'rating_count' ) ) |
199 | | - ); |
| 200 | + ) ); |
200 | 201 | |
201 | | - $stats['comments'] = $this->getLang()->formatNum( $contestant->getField( 'comments' ) ); |
| 202 | + $stats['comments'] = htmlspecialchars( $this->getLang()->formatNum( $contestant->getField( 'comments' ) ) ); |
202 | 203 | |
203 | 204 | return $stats; |
204 | 205 | } |
— | — | @@ -320,7 +321,7 @@ |
321 | 322 | 'contest-contestant-comment-by', |
322 | 323 | Linker::userLink( $comment->getField( 'user_id' ), $user->getName() ) . |
323 | 324 | Linker::userToolLinks( $comment->getField( 'user_id' ), $user->getName() ) |
324 | | - ) . '   ' . $this->getLang()->timeanddate( $comment->getField( 'time' ), true ) |
| 325 | + ) . '   ' . htmlspecialchars( $this->getLang()->timeanddate( $comment->getField( 'time' ), true ) ) |
325 | 326 | ); |
326 | 327 | |
327 | 328 | $html .= Html::rawElement( |
Index: trunk/extensions/Contest/specials/SpecialContestSignup.php |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | * landing page. |
51 | 51 | * |
52 | 52 | * @return false|boolean |
53 | | - */ |
| 53 | + */ |
54 | 54 | public function isListed() { |
55 | 55 | |
56 | 56 | return false; |
— | — | @@ -157,7 +157,7 @@ |
158 | 158 | } |
159 | 159 | else { |
160 | 160 | $out->redirect( SpecialPage::getTitleFor( 'MyContests', $contest->getField( 'name' ) )->getLocalURL() ); |
161 | | - } |
| 161 | + } |
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
— | — | @@ -174,7 +174,7 @@ |
175 | 175 | $form->setSubmitCallback( array( $this, 'handleSubmission' ) ); |
176 | 176 | $form->setSubmitText( wfMsg( 'contest-signup-submit' ) ); |
177 | 177 | |
178 | | - if( $form->show() ){ |
| 178 | + if( $form->show() ) { |
179 | 179 | $this->showSucess( $contest ); |
180 | 180 | } |
181 | 181 | else { |
Index: trunk/extensions/Contest/specials/SpecialEditContest.php |
— | — | @@ -138,6 +138,7 @@ |
139 | 139 | 'cancelEdit', |
140 | 140 | wfMsg( 'cancel' ), |
141 | 141 | 'cancelEdit', |
| 142 | + // FIXME: don't use onclick, use jQuery |
142 | 143 | array( |
143 | 144 | 'onclick' => 'window.location="' . SpecialPage::getTitleFor( 'Contests' )->getFullURL() . '";return false;' |
144 | 145 | ) |
Index: trunk/extensions/Contest/includes/ContestUtils.php |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | |
57 | 57 | // Looks like the LinkEnd hook can be used here instead of replaceRelativeLinks. |
58 | 58 | // The hook could just turn relative urls into absolute ones in a nice way, |
59 | | - // but would reauire setting some global such as $isContestEmailParse to true |
| 59 | + // but would require setting some global such as $isContestEmailParse to true |
60 | 60 | // before the parse call and to false afterwards, which also is not very nice. |
61 | 61 | |
62 | 62 | global $wgParser; |
Index: trunk/extensions/Contest/includes/ContestComment.php |
— | — | @@ -113,7 +113,7 @@ |
114 | 114 | |
115 | 115 | if ( $success ) { |
116 | 116 | $contestant = new ContestContestant( array( 'id' => $this->getField( 'contestant_id' ) ) ); |
117 | | - $contestant->addToField( 'comments', 1 ); |
| 117 | + $contestant->addToField( 'comments', 1 ); |
118 | 118 | } |
119 | 119 | |
120 | 120 | return $success; |
Index: trunk/extensions/Contest/includes/ContestContestant.php |
— | — | @@ -499,13 +499,13 @@ |
500 | 500 | wfRunHooks( 'ContestBeforeSignupEmail', array( &$this, &$title, &$emailText, &$user, &$sender, &$senderName ) ); |
501 | 501 | |
502 | 502 | return UserMailer::send( |
503 | | - new MailAddress( $user ), |
504 | | - new MailAddress( $sender, $senderName ), |
505 | | - $title, |
506 | | - $emailText, |
507 | | - null, |
508 | | - 'text/html; charset=ISO-8859-1' |
509 | | - ); |
| 503 | + new MailAddress( $user ), |
| 504 | + new MailAddress( $sender, $senderName ), |
| 505 | + $title, |
| 506 | + $emailText, |
| 507 | + null, |
| 508 | + 'text/html; charset=ISO-8859-1' |
| 509 | + ); |
510 | 510 | } |
511 | 511 | |
512 | 512 | /** |
— | — | @@ -527,13 +527,13 @@ |
528 | 528 | wfRunHooks( 'ContestBeforeReminderEmail', array( &$this, &$title, &$emailText, &$user, &$sender, &$senderName ) ); |
529 | 529 | |
530 | 530 | return UserMailer::send( |
531 | | - new MailAddress( $user ), |
532 | | - new MailAddress( $sender, $senderName ), |
533 | | - $title, |
534 | | - $emailText, |
535 | | - null, |
536 | | - 'text/html; charset=ISO-8859-1' |
537 | | - ); |
| 531 | + new MailAddress( $user ), |
| 532 | + new MailAddress( $sender, $senderName ), |
| 533 | + $title, |
| 534 | + $emailText, |
| 535 | + null, |
| 536 | + 'text/html; charset=ISO-8859-1' |
| 537 | + ); |
538 | 538 | } |
539 | 539 | |
540 | 540 | /** |