* @ingroup Actions
*/
+use MediaWiki\MediaWikiServices;
+
/**
* Mark a revision as patrolled on a page
*
protected function preText() {
$rc = $this->getRecentChange();
$title = $rc->getTitle();
+ $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
// Based on logentry-patrol-patrol (see PatrolLogFormatter)
$revId = $rc->getAttribute( 'rc_this_oldid' );
'diff' => $revId,
'oldid' => $rc->getAttribute( 'rc_last_oldid' )
];
- $revlink = Linker::link( $title, htmlspecialchars( $revId ), [], $query );
- $pagelink = Linker::link( $title, htmlspecialchars( $title->getPrefixedText() ) );
+ $revlink = $linkRenderer->makeLink( $title, $revId, [], $query );
+ $pagelink = $linkRenderer->makeLink( $title, $title->getPrefixedText() );
return $this->msg( 'confirm-markpatrolled-top' )->params(
$title->getPrefixedText(),
}
/**
+ * @param array $data
* @return bool|array True for success, false for didn't-try, array of errors on failure
*/
public function onSubmit( $data ) {