55 parent::__construct( $article,
$context );
56 $this->linkRenderer = $linkRenderer;
60 return 'markpatrolled';
79 $rcId = $data ? intval( $data[
'rcid'] ) : $this->
getRequest()->getInt(
'rcid' );
81 $rc = RecentChange::newFromId( $rcId );
84 throw new ErrorPageError(
'markedaspatrollederror',
'markedaspatrollederrortext' );
91 $title = $rc->getTitle();
94 $revId = $rc->getAttribute(
'rc_this_oldid' );
96 'curid' => $rc->getAttribute(
'rc_cur_id' ),
98 'oldid' => $rc->getAttribute(
'rc_last_oldid' )
100 $revlink = $this->linkRenderer->makeLink( $title, $revId, [], $query );
101 $pagelink = $this->linkRenderer->makeLink( $title, $title->getPrefixedText() );
103 return $this->
msg(
'confirm-markpatrolled-top' )->params(
104 $title->getPrefixedText(),
125 if ( $status->hasMessage(
'rcpatroldisabled' ) ) {
126 throw new ErrorPageError(
'rcpatroldisabled',
'rcpatroldisabledtext' );
131 if ( $rc->getAttribute(
'rc_type' ) ==
RC_NEW ) {
132 $returnTo =
'Newpages';
133 } elseif ( $rc->getAttribute(
'rc_log_type' ) ==
'upload' ) {
134 $returnTo =
'Newfiles';
136 $returnTo =
'Recentchanges';
140 if ( $status->hasMessage(
'markedaspatrollederror-noautopatrol' ) ) {
141 $this->
getOutput()->setPageTitleMsg( $this->
msg(
'markedaspatrollederror' ) );
142 $this->
getOutput()->addWikiMsg(
'markedaspatrollederror-noautopatrol' );
143 $this->
getOutput()->returnToMain(
null, $return );
147 if ( !$status->isGood() ) {
148 if ( !$status->hasMessage(
'hookaborted' ) ) {
155 $this->
getOutput()->setPageTitleMsg( $this->
msg(
'markedaspatrolled' ) );
156 $this->
getOutput()->addWikiMsg(
'markedaspatrolledtext', $rc->getTitle()->getPrefixedText() );
157 $this->
getOutput()->returnToMain(
null, $return );
171class_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.