Go to the documentation of this file.
34 parent::__construct(
'Protectedtitles' );
43 $level =
$request->getVal( $this->IdLevel );
44 $sizetype =
$request->getVal(
'sizetype' );
45 $size =
$request->getIntOrNull(
'size' );
46 $NS =
$request->getIntOrNull(
'namespace' );
52 if ( $pager->getNumRows() ) {
54 $pager->getNavigationBar() .
55 '<ul>' . $pager->getBody() .
'</ul>' .
56 $pager->getNavigationBar()
59 $this->
getOutput()->addWikiMsg(
'protectedtitlesempty' );
77 [
'class' =>
'mw-invalidtitle' ],
88 $description_items = [];
90 $protType = $this->
msg(
'restriction-level-' . $row->pt_create_perm )->escaped();
91 $description_items[] = $protType;
93 $expiry = strlen( $row->pt_expiry ) ?
94 $lang->formatExpiry( $row->pt_expiry, TS_MW ) :
97 if ( $expiry !==
'infinity' ) {
99 $description_items[] = $this->
msg(
100 'protect-expiring-local',
108 return '<li>' .
$lang->specialList(
$link, implode( $description_items,
', ' ) ) .
"</li>\n";
119 $action = htmlspecialchars(
wfScript() );
123 return "<form action=\"$action\" method=\"get\">\n" .
130 "</fieldset></form>";
143 'selected' => $namespace,
145 'label' => $this->
msg(
'namespace' )->
text()
147 'name' =>
'namespace',
149 'class' =>
'namespaceselector',
161 $m = [ $this->
msg(
'restriction-level-all' )->text() => 0 ];
166 if ( $type !=
'' &&
$type !=
'*' ) {
168 $text = $this->
msg(
"restriction-level-$type" )->text();
174 if (
count( $m ) <= 2 ) {
178 foreach ( $m
as $text =>
$type ) {
179 $selected = (
$type == $pr_level );
183 return Xml::label( $this->
msg(
'restriction-level' )->
text(), $this->IdLevel ) .
' ' .
185 [
'id' => $this->IdLevel,
'name' => $this->IdLevel ],
190 return 'maintenance';
getPageTitle( $subpage=false)
Get a self-referential title object.
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
msg( $key)
Wrapper around wfMessage that sets the current context.
showOptions( $namespace, $type='edit', $level)
static tags( $element, $attribs=null, $contents)
Same as Xml::element(), but does not escape contents.
getOutput()
Get the OutputPage being used for this instance.
if(!isset( $args[0])) $lang
static label( $label, $id, $attribs=[])
Convenience function to build an HTML form label.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
static option( $text, $value=null, $selected=false, $attribs=[])
Convenience function to build an HTML drop-down list item.
A special page that list protected titles from creation.
getLanguage()
Shortcut to get user's language.
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
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
formatRow( $row)
Callback function to output a restriction.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
getConfig()
Shortcut to get main config object.
namespace and then decline to actually register it file or subcat img or subcat $title
wfScript( $script='index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
getNamespaceMenu( $namespace=null)
Prepare the namespace filter drop-down; standard namespace selector, sans the MediaWiki namespace.
execute( $par)
Default execute method Checks user permissions.
static element( $element, $attribs=null, $contents='', $allowShortTag=true)
Format an XML element with given attributes and, optionally, text content.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getUser()
Shortcut to get the User executing this instance.
getContext()
Gets the context this SpecialPage is executed in.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on $request
static hidden( $name, $value, array $attribs=[])
Convenience function to produce an input element with type=hidden.
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
static namespaceSelector(array $params=[], array $selectAttribs=[])
Build a drop-down box for selecting a namespace.
Parent class for all special pages.
getRequest()
Get the WebRequest being used for this instance.
this hook is for auditing only RecentChangesLinked and Watchlist $special
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 & $options
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
usually copyright or history_copyright This message must be in HTML not wikitext & $link
static element( $element, $attribs=[], $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
static submitButton( $value, $attribs=[])
Convenience function to build an HTML submit button When $wgUseMediaWikiUIEverywhere is true it will ...