http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100309

Revision: 100309
Author:   reedy
Date:     2011-10-20 00:57:20 +0000 (Thu, 20 Oct 2011)
Log Message:
-----------
array_splice first parameter is passed by reference

This means, on every splice, items are removed from the contestant array

This fixes the contestant count

Modified Paths:
--------------
    trunk/extensions/Contest/api/ApiMailContestants.php

Modified: trunk/extensions/Contest/api/ApiMailContestants.php
===================================================================
--- trunk/extensions/Contest/api/ApiMailContestants.php 2011-10-20 00:50:22 UTC 
(rev 100308)
+++ trunk/extensions/Contest/api/ApiMailContestants.php 2011-10-20 00:57:20 UTC 
(rev 100309)
@@ -72,7 +72,8 @@
 
                $contestants = ContestContestant::s()->select( array( 'id', 
'user_id', 'contest_id', 'email' ), $conditions );
 
-               if ( $contestants !== false && count( $contestants ) > 0 ) {
+               $contestantCount = count( $contestants );
+               if ( $contestants !== false && $contestantCount > 0 ) {
                        $setSize = ContestSettings::get( 'reminderJobSize' );
                        $limit = count( $contestants );
 
@@ -94,7 +95,7 @@
                        $this->getResult()->addValue(
                                null,
                                'contestantcount',
-                               count( $contestants )
+                               $contestantCount
                        );
                }
        }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to