r99513 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99512‎ | r99513 | r99514 >
Date:18:09, 11 October 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
Follow up to r99488;
Modified paths:
  • /trunk/extensions/Contest/Contest.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.hooks.php
@@ -205,15 +205,17 @@
206206
207207 $contestantIds = array();
208208
209 - foreach ( $contestants as $contestant ) {
210 - $contestantIds[] = $contestant->contestant_id;
 209+ if ( count( $contestants ) > 0 ) {
 210+ foreach ( $contestants as $contestant ) {
 211+ $contestantIds[] = $contestant->contestant_id;
 212+ }
 213+
 214+ ContestContestant::s()->update(
 215+ array( 'email' => $email ),
 216+ array( 'id' => $contestantIds )
 217+ );
211218 }
212219
213 - ContestContestant::s()->update(
214 - array( 'email' => $email ),
215 - array( 'id' => $contestantIds )
216 - );
217 -
218220 return true;
219221 }
220222

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99488work on handling of email and real/user namesjeroendedauw16:14, 11 October 2011

Status & tagging log