34 parent::__construct(
'Protectedpages' );
40 $this->
getOutput()->addModuleStyles(
'mediawiki.special' );
44 $level =
$request->getVal( $this->IdLevel );
45 $sizetype =
$request->getVal(
'sizetype' );
46 $size =
$request->getIntOrNull(
'size' );
47 $ns =
$request->getIntOrNull(
'namespace' );
48 $indefOnly =
$request->getBool(
'indefonly' ) ? 1 : 0;
49 $cascadeOnly =
$request->getBool(
'cascadeonly' ) ? 1 : 0;
50 $noRedirect =
$request->getBool(
'noredirect' ) ? 1 : 0;
77 if ( $pager->getNumRows() ) {
78 $this->
getOutput()->addParserOutputContent( $pager->getFullOutput() );
80 $this->
getOutput()->addWikiMsg(
'protectedpagesempty' );
96 $size, $indefOnly, $cascadeOnly, $noRedirect
100 return Xml::openElement(
'form', [
'method' =>
'get',
'action' =>
wfScript() ] ) .
101 Xml::openElement(
'fieldset' ) .
102 Xml::element(
'legend', [], $this->
msg(
'protectedpages' )->
text() ) .
103 Html::hidden(
'title', $title->getPrefixedDBkey() ) .
"\n" .
113 Xml::submitButton( $this->
msg(
'protectedpages-submit' )->
text() ) .
"\n" .
114 Xml::closeElement(
'fieldset' ) .
115 Xml::closeElement(
'form' );
126 return Html::rawElement(
'span', [
'class' =>
'mw-input-with-label' ],
127 Html::namespaceSelector(
129 'selected' => $namespace,
131 'label' => $this->
msg(
'namespace' )->
text()
133 'name' =>
'namespace',
135 'class' =>
'namespaceselector',
146 return '<span class="mw-input-with-label">' . Xml::checkLabel(
147 $this->
msg(
'protectedpages-indef' )->
text(),
159 return '<span class="mw-input-with-label">' . Xml::checkLabel(
160 $this->
msg(
'protectedpages-cascade' )->
text(),
172 return '<span class="mw-input-with-label">' . Xml::checkLabel(
173 $this->
msg(
'protectedpages-noredirect' )->
text(),
186 $max = $sizetype ===
'max';
188 return '<span class="mw-input-with-label">' . Xml::radioLabel(
189 $this->
msg(
'minimum-size' )->
text(),
197 $this->
msg(
'maximum-size' )->
text(),
204 Xml::input(
'size', 9, $size, [
'id' =>
'wpsize' ] ) .
206 Xml::label( $this->
msg(
'pagesize' )->
text(),
'wpsize' ) .
"</span>\n";
219 foreach ( Title::getFilteredRestrictionTypes(
true ) as
$type ) {
221 $text = $this->
msg(
"restriction-$type" )->text();
226 foreach ( $m as $text =>
$type ) {
227 $selected = (
$type == $pr_type );
231 return '<span class="mw-input-with-label">' .
232 Xml::label( $this->
msg(
'restriction-type' )->
text(), $this->IdType ) .
' ' .
234 [
'id' => $this->IdType,
'name' => $this->IdType ],
235 implode(
"\n",
$options ) ) .
"</span>";
245 $m = [ $this->
msg(
'restriction-level-all' )->text() => 0 ];
249 foreach ( $this->
getConfig()->
get(
'RestrictionLevels' ) as
$type ) {
252 $text = $this->
msg(
"restriction-level-$type" )->text();
258 foreach ( $m as $text =>
$type ) {
259 $selected = (
$type == $pr_level );
263 return '<span class="mw-input-with-label">' .
264 Xml::label( $this->
msg(
'restriction-level' )->
text(), $this->IdLevel ) .
' ' .
266 [
'id' => $this->IdLevel,
'name' => $this->IdLevel ],
267 implode(
"\n",
$options ) ) .
"</span>";
271 return 'maintenance';
wfScript( $script='index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
Parent class for all special pages.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getOutput()
Get the OutputPage being used for this instance.
msg( $key)
Wrapper around wfMessage that sets the current context.
getConfig()
Shortcut to get main config object.
getRequest()
Get the WebRequest being used for this instance.
getPageTitle( $subpage=false)
Get a self-referential title object.
A special page that lists protected pages.
getNamespaceMenu( $namespace=null)
Prepare the namespace filter drop-down; standard namespace selector, sans the MediaWiki namespace.
getCascadeCheck( $cascadeOnly)
getExpiryCheck( $indefOnly)
getRedirectCheck( $noRedirect)
getLevelMenu( $pr_level)
Creates the input label of the restriction level.
showOptions( $namespace, $type='edit', $level, $sizetype, $size, $indefOnly, $cascadeOnly, $noRedirect)
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
getTypeMenu( $pr_type)
Creates the input label of the restriction type.
execute( $par)
Default execute method Checks user permissions.
getSizeLimit( $sizetype, $size)
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
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
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