Go to the documentation of this file.
33 return 'markpatrolled';
52 $rcId = $data ? intval( $data[
'rcid'] ) : $this->
getRequest()->getInt(
'rcid' );
57 throw new ErrorPageError(
'markedaspatrollederror',
'markedaspatrollederrortext' );
65 $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
68 $revId = $rc->getAttribute(
'rc_this_oldid' );
70 'curid' => $rc->getAttribute(
'rc_cur_id' ),
72 'oldid' => $rc->getAttribute(
'rc_last_oldid' )
77 return $this->
msg(
'confirm-markpatrolled-top' )->params(
80 Message::rawParam( $pagelink ),
81 Message::rawParam( $revlink )
98 $errors = $rc->doMarkPatrolled(
$user );
100 if ( in_array( [
'rcpatroldisabled' ], $errors ) ) {
101 throw new ErrorPageError(
'rcpatroldisabled',
'rcpatroldisabledtext' );
106 if ( $rc->getAttribute(
'rc_type' ) ==
RC_NEW ) {
107 $returnTo =
'Newpages';
108 } elseif ( $rc->getAttribute(
'rc_log_type' ) ==
'upload' ) {
109 $returnTo =
'Newfiles';
111 $returnTo =
'Recentchanges';
115 if ( in_array( [
'markedaspatrollederror-noautopatrol' ], $errors ) ) {
116 $this->
getOutput()->setPageTitle( $this->
msg(
'markedaspatrollederror' ) );
117 $this->
getOutput()->addWikiMsg(
'markedaspatrollederror-noautopatrol' );
118 $this->
getOutput()->returnToMain(
null, $return );
123 if ( !in_array( [
'hookaborted' ], $errors ) ) {
130 $this->
getOutput()->setPageTitle( $this->
msg(
'markedaspatrolled' ) );
131 $this->
getOutput()->addWikiMsg(
'markedaspatrolledtext', $rc->getTitle()->getPrefixedText() );
132 $this->
getOutput()->returnToMain(
null, $return );
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
getRequest()
Get the WebRequest being used for this instance.
usesOOUI()
Whether the form should use OOUI.
preText()
Add pre- or post-text to the form.
getDescription()
Returns the description that goes below the <h1> tag.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form before processing starts Return false to skip default processing and return $ret $linkRenderer
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,...
Show an error when a user tries to do something they do not have the necessary permissions for.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
getName()
Return the name of the action this object responds to.
null for the wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query
alterForm(HTMLForm $form)
Play with the HTMLForm if you need to more substantially.
namespace and then decline to actually register it file or subcat img or subcat $title
msg( $key)
Get a Message object with context set Parameters are the same as wfMessage()
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
onSuccess()
Do something exciting on successful processing of the form.
getRestriction()
Get the permission required to perform this action.
static newFromId( $rcid)
Obtain the recent change with a given rc_id value.
getUser()
Shortcut to get the User being used for this instance.
getOutput()
Get the OutputPage being used for this instance.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency MediaWikiServices
An error page which can definitely be safely rendered using the OutputPage.
doesWrites()
Indicates whether this action may perform database writes.
Mark a revision as patrolled on a page.
getRecentChange( $data=null)