} else {
$title = null;
}
+
return $title;
}
}
if ( $this->mOldRestrictions === false ) {
- $this->mOldRestrictions = $dbr->selectField( 'page', 'page_restrictions',
- [ 'page_id' => $this->getArticleID() ], __METHOD__ );
+ $linkCache = MediaWikiServices::getInstance()->getLinkCache();
+ $linkCache->addLinkObj( $this ); # in case we already had an article ID
+ $this->mOldRestrictions = $linkCache->getGoodLinkFieldObj( $this, 'restrictions' );
}
if ( $this->mOldRestrictions != '' ) {