/** * Returns value to be used in 'historyLink' element of $data param in * EnhancedChangesListModifyBlockLineData hook. * * @since 1.27 * * @param RCCacheEntry $rc * @param array $query array of key/value pairs to append as a query string * @return string HTML */ public function getDiffHistLinks(RCCacheEntry $rc, array $query) { $pageTitle = $rc->getTitle(); if ($rc->getAttribute('rc_type') == RC_CATEGORIZE) { // For categorizations we must swap the category title with the page title! $pageTitle = Title::newFromID($rc->getAttribute('rc_cur_id')); } $retVal = ' ' . $this->msg('parentheses')->rawParams($rc->difflink . $this->message['pipe-separator'] . $this->linkRenderer->makeKnownLink($pageTitle, new HtmlArmor($this->message['hist']), [], $query))->escaped(); return $retVal; }
/** * Determines whether a revision is linked to this change; this may not be the case * when the categorization wasn't done by an edit but a conditional parser function * * @since 1.27 * * @param RecentChange|RCCacheEntry $rcObj * @return bool */ protected function isCategorizationWithoutRevision($rcObj) { return intval($rcObj->getAttribute('rc_type')) === RC_CATEGORIZE && intval($rcObj->getAttribute('rc_this_oldid')) === 0; }