protected $undo = 0, $undoafter = 0, $cur = 0;
- /** @param RevisionRecord|null */
+ /** @var RevisionRecord|null */
protected $curRev = null;
public function getName() {
'h2', [ 'id' => 'mw-previewheader' ],
$this->context->msg( 'preview' )->text()
) .
- $out->parseAsInterface( $note ) .
- "<hr />"
+ Html::rawElement( 'div', [ 'class' => 'warningbox' ],
+ $out->parseAsInterface( $note )
+ )
);
$pageViewLang = $this->getTitle()->getPageViewLanguage();
$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 );
}