From: Antoine Musso Date: Wed, 30 May 2012 19:17:30 +0000 (+0200) Subject: missing $dbr instance in JobQueue X-Git-Tag: 1.31.0-rc.0~23461 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=58f390e9bf9a6b1b649f109aad503fa9f8d42558;p=lhc%2Fweb%2Fwiklou.git missing $dbr instance in JobQueue This comes from factoring done with commit fb69ee4. To add quotes based on the database type, we actually need a Database instance! Fault introduced by https://gerrit.wikimedia.org/r/9116 Change-Id: I7a4f7fb1a744cd7adb5166e66424b664edb3d9e8 --- diff --git a/includes/job/JobQueue.php b/includes/job/JobQueue.php index 7a4f0ad4ff..7b7ec0c22a 100644 --- a/includes/job/JobQueue.php +++ b/includes/job/JobQueue.php @@ -328,6 +328,7 @@ abstract class Job { global $wgJobTypesExcludedFromDefaultQueue; $conditions = array(); if ( count( $wgJobTypesExcludedFromDefaultQueue ) > 0 ) { + $dbr = wfGetDB( DB_SLAVE ); foreach ( $wgJobTypesExcludedFromDefaultQueue as $cmdType ) { $conditions[] = "job_cmd != " . $dbr->addQuotes( $cmdType ); }