X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FMarkpatrolledAction.php;h=66bedb2bdfbf2cc24d1dd12dc70f6e704d5309ed;hb=2cb965c5a5393a168fe71561e5dfe8d2bb9fce98;hp=8df60445da00a3678ba3d59e5fd4cb3be0177f5a;hpb=5111bd2def4e63ecc8a2acbf468e5c39029f9efd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/MarkpatrolledAction.php b/includes/actions/MarkpatrolledAction.php index 8df60445da..66bedb2bdf 100644 --- a/includes/actions/MarkpatrolledAction.php +++ b/includes/actions/MarkpatrolledAction.php @@ -20,6 +20,8 @@ * @ingroup Actions */ +use MediaWiki\MediaWikiServices; + /** * Mark a revision as patrolled on a page * @@ -56,6 +58,7 @@ class MarkpatrolledAction extends FormAction { 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' ); @@ -64,8 +67,8 @@ class MarkpatrolledAction extends FormAction { '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(), @@ -82,6 +85,7 @@ class MarkpatrolledAction extends FormAction { } /** + * @param array $data * @return bool|array True for success, false for didn't-try, array of errors on failure */ public function onSubmit( $data ) {