Index: trunk/extensions/Contest/Contest.hooks.php |
— | — | @@ -83,16 +83,17 @@ |
84 | 84 | array( 'contestant_id' ), |
85 | 85 | array( 'contest_status' => Contest::STATUS_ACTIVE ), |
86 | 86 | '', |
| 87 | + array(), |
87 | 88 | array( 'contests' => array( 'INNER JOIN', array( 'contest_id=contestant_contest_id' ) ) ) |
88 | 89 | ); |
89 | 90 | |
90 | 91 | $contestantIds = array(); |
91 | 92 | |
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 ) { |
97 | 98 | ContestContestant::s()->update( |
98 | 99 | array( 'email' => $email ), |
99 | 100 | array( 'id' => $contestantIds ) |