Big oops - merged to wrong branch.
[lhc/web/wiklou.git] / maintenance / nextJobDB.php
index 67aa308..ac4e723 100644 (file)
@@ -94,11 +94,12 @@ class nextJobDB extends Maintenance {
                $lb = wfGetLB( $dbName );
                $db = $lb->getConnection( DB_MASTER, array(), $dbName );
                if ( $type === false ) {
-                       $conds = array();
+                       $conds = Job::defaultQueueConditions( );
                } else {
                        $conds = array( 'job_cmd' => $type );
                }
 
+
                $exists = (bool) $db->selectField( 'job', '1', $conds, __METHOD__ );
                $lb->reuseConnection( $db );
                return $exists;