protected $undo = 0, $undoafter = 0, $cur = 0;
- /** @param RevisionRecord|null */
+ /** @var RevisionRecord|null */
protected $curRev = null;
public function getName() {
$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 );
}