Fix access to other wiki's job queue.
authordaniel <daniel.kinzler@wikimedia.de>
Thu, 10 Jan 2013 11:03:40 +0000 (12:03 +0100)
committerdaniel <daniel.kinzler@wikimedia.de>
Thu, 10 Jan 2013 11:03:40 +0000 (12:03 +0100)
LoadBalancer::getConnection needs the target wiki's ID, even
if we got the LoadBalancer instance specifically for that wiki.

Change-Id: I3fc81666dfa2552fac3ced2cadbd3f6db09e9596

includes/job/JobQueueDB.php

index 8c81cf0..de2f6dc 100644 (file)
@@ -576,7 +576,7 @@ class JobQueueDB extends JobQueue {
                $lb = ( $this->cluster !== false )
                        ? wfGetLBFactory()->getExternalLB( $this->cluster, $this->wiki )
                        : wfGetLB( $this->wiki );
-               $conn = $lb->getConnection( $index );
+               $conn = $lb->getConnection( $index, array(), $this->wiki );
                return array(
                        $conn,
                        new ScopedCallback( function() use ( $lb, $conn ) {