ActorStoreFactory: fetch local domain from LBFactory
WikiMap::getCurrentWikiDbDomain is based on globals which might not yet be correct during installation. Bug: T286045 Change-Id: I7c1b01884db77ca83dd01cc7baf164be6e6b7a35
This commit is contained in:
parent
cd45c0fc30
commit
68f7a66c22
1 changed files with 1 additions and 2 deletions
|
|
@ -23,7 +23,6 @@ namespace MediaWiki\User;
|
|||
use MediaWiki\Config\ServiceOptions;
|
||||
use MediaWiki\DAO\WikiAwareEntity;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use WikiMap;
|
||||
use Wikimedia\Rdbms\ILBFactory;
|
||||
use Wikimedia\Rdbms\ILoadBalancer;
|
||||
|
||||
|
|
@ -95,7 +94,7 @@ class ActorStoreFactory {
|
|||
// During the transition from User, we still have old User objects
|
||||
// representing users from a different wiki, so we still have IDatabase::getDomainId
|
||||
// passed as $wikiId, so we need to remap it back to LOCAL.
|
||||
if ( is_string( $wikiId ) && WikiMap::isCurrentWikiDbDomain( $wikiId ) ) {
|
||||
if ( is_string( $wikiId ) && $this->loadBalancerFactory->getLocalDomainID() === $wikiId ) {
|
||||
$wikiId = WikiAwareEntity::LOCAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue