r99534 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99533‎ | r99534 | r99535 >
Date:18:59, 11 October 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
fix check for contestants
Modified paths:
  • /trunk/extensions/Contest/Contest.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.hooks.php
@@ -83,16 +83,17 @@
8484 array( 'contestant_id' ),
8585 array( 'contest_status' => Contest::STATUS_ACTIVE ),
8686 '',
 87+ array(),
8788 array( 'contests' => array( 'INNER JOIN', array( 'contest_id=contestant_contest_id' ) ) )
8889 );
8990
9091 $contestantIds = array();
9192
92 - if ( count( $contestants ) > 0 ) {
93 - foreach ( $contestants as $contestant ) {
94 - $contestantIds[] = $contestant->contestant_id;
95 - }
96 -
 93+ foreach ( $contestants as $contestant ) {
 94+ $contestantIds[] = $contestant->contestant_id;
 95+ }
 96+
 97+ if ( count( $contestantIds ) > 0 ) {
9798 ContestContestant::s()->update(
9899 array( 'email' => $email ),
99100 array( 'id' => $contestantIds )

Status & tagging log