55 parent::__construct( $article,
$context );
56 $this->linkRenderer = $linkRenderer;
61 return 'markpatrolled';
87 $rcId = $data ? intval( $data[
'rcid'] ) : $this->
getRequest()->getInt(
'rcid' );
89 $rc = RecentChange::newFromId( $rcId );
92 throw new ErrorPageError(
'markedaspatrollederror',
'markedaspatrollederrortext' );
100 $title = $rc->getTitle();
103 $revId = $rc->getAttribute(
'rc_this_oldid' );
105 'curid' => $rc->getAttribute(
'rc_cur_id' ),
107 'oldid' => $rc->getAttribute(
'rc_last_oldid' )
109 $revlink = $this->linkRenderer->makeLink( $title, $revId, [], $query );
110 $pagelink = $this->linkRenderer->makeLink( $title, $title->getPrefixedText() );
112 return $this->
msg(
'confirm-markpatrolled-top' )->params(
113 $title->getPrefixedText(),
134 if ( $status->hasMessage(
'rcpatroldisabled' ) ) {
135 throw new ErrorPageError(
'rcpatroldisabled',
'rcpatroldisabledtext' );
140 if ( $rc->getAttribute(
'rc_type' ) ==
RC_NEW ) {
141 $returnTo =
'Newpages';
142 } elseif ( $rc->getAttribute(
'rc_log_type' ) ==
'upload' ) {
143 $returnTo =
'Newfiles';
145 $returnTo =
'Recentchanges';
149 if ( $status->hasMessage(
'markedaspatrollederror-noautopatrol' ) ) {
150 $this->
getOutput()->setPageTitleMsg( $this->
msg(
'markedaspatrollederror' ) );
151 $this->
getOutput()->addWikiMsg(
'markedaspatrollederror-noautopatrol' );
152 $this->
getOutput()->returnToMain(
null, $return );
156 if ( !$status->isGood() ) {
157 if ( !$status->hasMessage(
'hookaborted' ) ) {
164 $this->
getOutput()->setPageTitleMsg( $this->
msg(
'markedaspatrolled' ) );
165 $this->
getOutput()->addWikiMsg(
'markedaspatrolledtext', $rc->getTitle()->getPrefixedText() );
166 $this->
getOutput()->returnToMain(
null, $return );
182class_alias( MarkpatrolledAction::class,
'MarkpatrolledAction' );
An error page which can definitely be safely rendered using the OutputPage.
Legacy class representing an editable page and handling UI for some page actions.
Parent class for all special pages.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...
Generic operation result class Has warning/error list, boolean status and arbitrary value.
Interface for objects which can provide a MediaWiki context on request.