X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Factions%2FMcrUndoAction.php;h=68c0ea12432ad98d764515d7c4f13eb006457bc9;hb=db3a8beb778ba841cf6bf795312bdba796c58ee5;hp=b0f89dcf850dbe87471f36ed44eb516e70c9d467;hpb=751bac3786c561225f121b607189ccd865416e1b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/McrUndoAction.php b/includes/actions/McrUndoAction.php index b0f89dcf85..68c0ea1243 100644 --- a/includes/actions/McrUndoAction.php +++ b/includes/actions/McrUndoAction.php @@ -30,7 +30,7 @@ class McrUndoAction extends FormAction { protected $undo = 0, $undoafter = 0, $cur = 0; - /** @param RevisionRecord|null */ + /** @var RevisionRecord|null */ protected $curRev = null; public function getName() { @@ -289,8 +289,9 @@ class McrUndoAction extends FormAction { 'h2', [ 'id' => 'mw-previewheader' ], $this->context->msg( 'preview' )->text() ) . - $out->parseAsInterface( $note ) . - "
" + Html::rawElement( 'div', [ 'class' => 'warningbox' ], + $out->parseAsInterface( $note ) + ) ); $pageViewLang = $this->getTitle()->getPageViewLanguage(); @@ -336,8 +337,14 @@ class McrUndoAction extends FormAction { $updater->setOriginalRevisionId( false ); $updater->setUndidRevisionId( $this->undo ); + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + // TODO: Ugh. - if ( $wgUseRCPatrol && $this->getTitle()->userCan( 'autopatrol', $this->getUser() ) ) { + if ( $wgUseRCPatrol && $permissionManager->userCan( + 'autopatrol', + $this->getUser(), + $this->getTitle() ) + ) { $updater->setRcPatrolStatus( RecentChange::PRC_AUTOPATROLLED ); }