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(
* @param array $existing
* @return array
*/
- function getPropertyDeletions( $existing ) {
+ private function getPropertyDeletions( $existing ) {
return array_diff_assoc( $existing, $this->mProperties );
}
/**
* @return IDatabase
*/
- private function getDB() {
+ protected function getDB() {
if ( !$this->db ) {
$this->db = wfGetDB( DB_MASTER );
}
}
return [
- 'wiki' => WikiMap::getWikiIdFromDbDomain( $this->getDB()->getDomainID() ),
+ 'domain' => $this->getDB()->getDomainID(),
'job' => new JobSpecification(
'refreshLinksPrioritized',
[