X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdeferred%2FLinksUpdate.php;h=14f86b7c5e57eb938b052318853e32b049d3718d;hb=c7b0bb2459a6b14590b252935eccc2edfccae13b;hp=7a31e262539454047a541102f5413396c393b00d;hpb=a9ad6814b202efa115b670a6201d8cba31132788;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/deferred/LinksUpdate.php b/includes/deferred/LinksUpdate.php index 7a31e26253..14f86b7c5e 100644 --- a/includes/deferred/LinksUpdate.php +++ b/includes/deferred/LinksUpdate.php @@ -122,7 +122,11 @@ class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate { parent::__construct(); $this->mTitle = $title; - $this->mId = $title->getArticleID( Title::GAID_FOR_UPDATE ); + + if ( !$this->mId ) { + // NOTE: subclasses may initialize mId before calling this constructor! + $this->mId = $title->getArticleID( Title::GAID_FOR_UPDATE ); + } if ( !$this->mId ) { throw new InvalidArgumentException( @@ -1180,7 +1184,7 @@ class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate { /** * @return IDatabase */ - private function getDB() { + protected function getDB() { if ( !$this->db ) { $this->db = wfGetDB( DB_MASTER ); } @@ -1205,7 +1209,7 @@ class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate { } return [ - 'wiki' => WikiMap::getWikiIdFromDbDomain( $this->getDB()->getDomainID() ), + 'domain' => $this->getDB()->getDomainID(), 'job' => new JobSpecification( 'refreshLinksPrioritized', [