$this->lazyFillContentModel( $this->loadFieldFromDB( 'page_content_model', $flags ) );
} elseif (
( !$this->mContentModel || $flags & self::GAID_FOR_UPDATE ) &&
- $this->getArticleId( $flags )
+ $this->getArticleID( $flags )
) {
$linkCache = MediaWikiServices::getInstance()->getLinkCache();
$linkCache->addLinkObj( $this ); # in case we already had an article ID
$url = false;
$matches = [];
- if ( !empty( $wgActionPaths )
+ $articlePaths = PathRouter::getActionPaths( $wgActionPaths, $wgArticlePath );
+
+ if ( $articlePaths
&& preg_match( '/^(.*&|)action=([^&]*)(&(.*)|)$/', $query, $matches )
) {
$action = urldecode( $matches[2] );
- if ( isset( $wgActionPaths[$action] ) ) {
+ if ( isset( $articlePaths[$action] ) ) {
$query = $matches[1];
if ( isset( $matches[4] ) ) {
$query .= $matches[4];
}
- $url = str_replace( '$1', $dbkey, $wgActionPaths[$action] );
+ $url = str_replace( '$1', $dbkey, $articlePaths[$action] );
if ( $query != '' ) {
$url = wfAppendQuery( $url, $query );
}
* on the number of links. Typically called on create and delete.
*/
public function touchLinks() {
- DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this, 'pagelinks', 'page-touch' ) );
+ $jobs = [];
+ $jobs[] = HTMLCacheUpdateJob::newForBacklinks(
+ $this,
+ 'pagelinks',
+ [ 'causeAction' => 'page-touch' ]
+ );
if ( $this->mNamespace == NS_CATEGORY ) {
- DeferredUpdates::addUpdate(
- new HTMLCacheUpdate( $this, 'categorylinks', 'category-touch' )
+ $jobs[] = HTMLCacheUpdateJob::newForBacklinks(
+ $this,
+ 'categorylinks',
+ [ 'causeAction' => 'category-touch' ]
);
}
+
+ JobQueueGroup::singleton()->lazyPush( $jobs );
}
/**