X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FMcrUndoAction.php;h=41cd24e70125ebba6d66ab7ee6b1f3c674131b16;hb=0705929343a7fbd3417a475cd0c9a0dfe53c3dc4;hp=b0f89dcf850dbe87471f36ed44eb516e70c9d467;hpb=09ee5d2505f99cc146f871307be7ac00b7368d76;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/McrUndoAction.php b/includes/actions/McrUndoAction.php index b0f89dcf85..41cd24e701 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() { @@ -336,8 +336,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 ); }