X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fjobqueue%2FJobQueueGroup.php;h=328f2982f6859baa4d23c57ea2e57fa6cc70287a;hb=5196ac32c6;hp=b103b8eb4693824bc3196950d03e625ffcb309cd;hpb=8a5d98c10e7ed5296c4f9e99e828786179cd5070;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/jobqueue/JobQueueGroup.php b/includes/jobqueue/JobQueueGroup.php index b103b8eb46..328f2982f6 100644 --- a/includes/jobqueue/JobQueueGroup.php +++ b/includes/jobqueue/JobQueueGroup.php @@ -71,16 +71,16 @@ class JobQueueGroup { global $wgLocalDatabases; if ( $domain === false ) { - $domain = WikiMap::getCurrentWikiDomain()->getId(); + $domain = WikiMap::getCurrentWikiDbDomain()->getId(); } if ( !isset( self::$instances[$domain] ) ) { self::$instances[$domain] = new self( $domain, wfConfiguredReadOnlyReason() ); // Make sure jobs are not getting pushed to bogus wikis. This can confuse // the job runner system into spawning endless RPC requests that fail (T171371). - $wikiId = WikiMap::getWikiIdFromDomain( $domain ); + $wikiId = WikiMap::getWikiIdFromDbDomain( $domain ); if ( - !WikiMap::isCurrentWikiDomain( $domain ) && + !WikiMap::isCurrentWikiDbDomain( $domain ) && !in_array( $wikiId, $wgLocalDatabases ) ) { self::$instances[$domain]->invalidDomain = true; @@ -143,7 +143,7 @@ class JobQueueGroup { } $jobs = is_array( $jobs ) ? $jobs : [ $jobs ]; - if ( !count( $jobs ) ) { + if ( $jobs === [] ) { return; } @@ -430,10 +430,10 @@ class JobQueueGroup { */ private function getCachedConfigVar( $name ) { // @TODO: cleanup this whole method with a proper config system - if ( WikiMap::isCurrentWikiDomain( $this->domain ) ) { + if ( WikiMap::isCurrentWikiDbDomain( $this->domain ) ) { return $GLOBALS[$name]; // common case } else { - $wiki = WikiMap::getWikiIdFromDomain( $this->domain ); + $wiki = WikiMap::getWikiIdFromDbDomain( $this->domain ); $cache = MediaWikiServices::getInstance()->getMainWANObjectCache(); $value = $cache->getWithSetCallback( $cache->makeGlobalKey( 'jobqueue', 'configvalue', $this->domain, $name ),