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';
this hook is for auditing only RecentChangesLinked and Watchlist $special
getNamespaceMenu($namespace=null)
Prepare the namespace filter drop-down; standard namespace selector, sans the MediaWiki namespace...
getContext()
Gets the context this SpecialPage is executed in.
wfScript($script= 'index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
static element($element, $attribs=null, $contents= '', $allowShortTag=true)
Format an XML element with given attributes and, optionally, text content.
static rawElement($element, $attribs=[], $contents= '')
Returns an HTML element in a string.
if(!isset($args[0])) $lang
static hidden($name, $value, array $attribs=[])
Convenience function to produce an input element with type=hidden.
msg()
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
static submitButton($value, $attribs=[])
Convenience function to build an HTML submit button When $wgUseMediaWikiUIEverywhere is true it will ...
static label($label, $id, $attribs=[])
Convenience function to build an HTML form label.
outputHeader($summaryMessageKey= '')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
usually copyright or history_copyright This message must be in HTML not wikitext & $link
Parent class for all special pages.
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content as context as context $options
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.
const TS_MW
MediaWiki concatenated string timestamp (YYYYMMDDHHMMSS)
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes! ...
static makeTitleSafe($ns, $title, $fragment= '', $interwiki= '')
Create a new Title from a namespace index and a DB key.
namespace and then decline to actually register it file or subcat img or subcat $title
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
showOptions($namespace, $type= 'edit', $level)
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
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 local account $user
static link($target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
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
static tags($element, $attribs=null, $contents)
Same as Xml::element(), but does not escape contents.
error also a ContextSource you ll probably need to make sure the header is varied on $request
getUser()
Shortcut to get the User executing this instance.
getConfig()
Shortcut to get main config object.
getLanguage()
Shortcut to get user's language.
formatRow($row)
Callback function to output a restriction.
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
getRequest()
Get the WebRequest being used for this instance.
static element($element, $attribs=[], $contents= '')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values before the output is cached one of or reset my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled allows for interception of redirect as a string mapping parameter names to values & $type
getPageTitle($subpage=false)
Get a self-referential title object.
static namespaceSelector(array $params=[], array $selectAttribs=[])
Build a drop-down box for selecting a namespace.