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' );
70 $title = Title::makeTitleSafe( $row->pt_namespace, $row->pt_title );
72 return Html::rawElement(
77 [
'class' =>
'mw-invalidtitle' ],
89 $description = $this->
msg(
'restriction-level-' . $row->pt_create_perm )->escaped();
91 $expiry = strlen( $row->pt_expiry ) ?
92 $lang->formatExpiry( $row->pt_expiry, TS_MW ) :
95 if ( $expiry !==
'infinity' ) {
97 $description .= $this->
msg(
'comma-separator' )->escaped() . $this->
msg(
98 'protect-expiring-local',
99 $lang->userTimeAndDate( $expiry, $user ),
100 $lang->userDate( $expiry, $user ),
101 $lang->userTime( $expiry, $user )
105 return '<li>' .
$lang->specialList(
$link, $description ) .
"</li>\n";
118 'class' =>
'HTMLSelectNamespace',
119 'name' =>
'namespace',
121 'cssclass' =>
'namespaceselector',
123 'label' => $this->
msg(
'namespace' )->text()
131 ->setWrapperLegendMsg(
'protectedtitles' )
132 ->setSubmitText( $this->
msg(
'protectedtitles-submit' )->
text() );
134 return $htmlForm->prepareForm()->getHTML(
false );
144 $m = [ $this->
msg(
'restriction-level-all' )->text() => 0 ];
148 foreach ( $this->
getConfig()->
get(
'RestrictionLevels' ) as
$type ) {
151 $text = $this->
msg(
"restriction-level-$type" )->text();
157 if ( count( $m ) <= 2 ) {
161 foreach ( $m as $text =>
$type ) {
168 'label' => $this->
msg(
'restriction-level' )->text(),
175 return 'maintenance';
This list may contain false positives That usually means there is additional text with links below the first Each row contains links to the first and second as well as the first line of the second redirect text
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
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.
getUser()
Shortcut to get the User executing this instance.
getContext()
Gets the context this SpecialPage is executed in.
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.
getLanguage()
Shortcut to get user's language.
A special page that list protected titles from creation.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
formatRow( $row)
Callback function to output a restriction.
execute( $par)
Default execute method Checks user permissions.
showOptions( $namespace, $type, $level)
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
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation use $formDescriptor instead & $formDescriptor
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
usually copyright or history_copyright This message must be in HTML not wikitext & $link
if(!isset( $args[0])) $lang