missing $dbr instance in JobQueue
authorAntoine Musso <hashar@free.fr>
Wed, 30 May 2012 19:17:30 +0000 (21:17 +0200)
committerAntoine Musso <hashar@free.fr>
Wed, 30 May 2012 19:17:30 +0000 (21:17 +0200)
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

includes/job/JobQueue.php

index 7a4f0ad..7b7ec0c 100644 (file)
@@ -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 );
                        }