http://www.mediawiki.org/wiki/Special:Code/MediaWiki/83637
Revision: 83637 Author: tstarling Date: 2011-03-10 04:48:09 +0000 (Thu, 10 Mar 2011) Log Message: ----------- MFT r83636: some bug fixes (already live) Modified Paths: -------------- branches/wmf/1.17wmf1/maintenance/nextJobDB.php Property Changed: ---------------- branches/wmf/1.17wmf1/maintenance/nextJobDB.php Modified: branches/wmf/1.17wmf1/maintenance/nextJobDB.php =================================================================== --- branches/wmf/1.17wmf1/maintenance/nextJobDB.php 2011-03-10 04:47:21 UTC (rev 83636) +++ branches/wmf/1.17wmf1/maintenance/nextJobDB.php 2011-03-10 04:48:09 UTC (rev 83637) @@ -62,6 +62,7 @@ return; } + $candidates = array_values( $candidates ); $db = $candidates[ mt_rand( 0, count( $candidates ) - 1 ) ]; if ( !$this->checkJob( $type, $db ) ) { // This job is not available in the current database. Remove it from @@ -86,9 +87,9 @@ * Check if the specified database has a job of the specified type in it. * The type may be false to indicate "all". */ - function checkJob( $type, $db ) { - $lb = wfGetLB( $db ); - $db = $lb->getConnection( DB_MASTER ); + function checkJob( $type, $dbName ) { + $lb = wfGetLB( $dbName ); + $db = $lb->getConnection( DB_MASTER, array(), $dbName ); if ( $type === false ) { $conds = array(); } else { Property changes on: branches/wmf/1.17wmf1/maintenance/nextJobDB.php ___________________________________________________________________ Modified: svn:mergeinfo - /branches/REL1_15/phase3/maintenance/nextJobDB.php:51646 /branches/new-installer/phase3/maintenance/nextJobDB.php:43664-66004 /branches/sqlite/maintenance/nextJobDB.php:58211-58321 /branches/wmf/1.16wmf4/maintenance/nextJobDB.php:67177,69199,76243,77266 /branches/wmf/1.17wmf1/maintenance/nextJobDB.php:83634 /branches/wmf-deployment/maintenance/nextJobDB.php:60970 /trunk/phase3/maintenance/nextJobDB.php:79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,81833,83212,83590,83634 + /branches/REL1_15/phase3/maintenance/nextJobDB.php:51646 /branches/new-installer/phase3/maintenance/nextJobDB.php:43664-66004 /branches/sqlite/maintenance/nextJobDB.php:58211-58321 /branches/wmf/1.16wmf4/maintenance/nextJobDB.php:67177,69199,76243,77266 /branches/wmf/1.17wmf1/maintenance/nextJobDB.php:83634 /branches/wmf-deployment/maintenance/nextJobDB.php:60970 /trunk/phase3/maintenance/nextJobDB.php:79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,81833,83212,83590,83634,83636 _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs