X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FMarkpatrolledAction.php;h=431ea06ad03d9b27dd813990eecbdd584fafa4e9;hb=a5c7fd0db2d962834127ec2362d0dfe8ef6852d5;hp=8df60445da00a3678ba3d59e5fd4cb3be0177f5a;hpb=63ab00b60ddc167b6359c7d51ed9e9c4f65b7258;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/MarkpatrolledAction.php b/includes/actions/MarkpatrolledAction.php index 8df60445da..431ea06ad0 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 * @@ -40,6 +42,10 @@ class MarkpatrolledAction extends FormAction { return 'patrol'; } + protected function usesOOUI() { + return true; + } + protected function getRecentChange( $data = null ) { $rc = null; // Note: This works both on initial GET url and after submitting the form @@ -56,6 +62,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 +71,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 +89,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 ) {