34 parent::__construct(
'Protectedtitles' );
43 $type = $request->getVal( $this->IdType );
44 $level = $request->getVal( $this->IdLevel );
45 $sizetype = $request->getVal(
'sizetype' );
46 $size = $request->getIntOrNull(
'size' );
47 $NS = $request->getIntOrNull(
'namespace' );
53 if ( $pager->getNumRows() ) {
55 $pager->getNavigationBar() .
56 '<ul>' . $pager->getBody() .
'</ul>' .
57 $pager->getNavigationBar()
60 $this->
getOutput()->addWikiMsg(
'protectedtitlesempty' );
73 return Html::rawElement(
78 [
'class' =>
'mw-invalidtitle' ],
90 $description = $this->
msg(
'restriction-level-' . $row->pt_create_perm )->escaped();
92 $expiry = strlen( $row->pt_expiry ) ?
93 $lang->formatExpiry( $row->pt_expiry, TS_MW ) :
96 if ( $expiry !==
'infinity' ) {
98 $description .= $this->
msg(
'comma-separator' )->escaped() . $this->
msg(
99 'protect-expiring-local',
100 $lang->userTimeAndDate( $expiry, $user ),
101 $lang->userDate( $expiry, $user ),
102 $lang->userTime( $expiry, $user )
106 return '<li>' .
$lang->specialList( $link, $description ) .
"</li>\n";
119 'class' =>
'HTMLSelectNamespace',
120 'name' =>
'namespace',
122 'cssclass' =>
'namespaceselector',
124 'label' => $this->
msg(
'namespace' )->text()
132 ->setWrapperLegendMsg(
'protectedtitles' )
133 ->setSubmitText( $this->
msg(
'protectedtitles-submit' )->text() );
135 return $htmlForm->prepareForm()->getHTML(
false );
145 $m = [ $this->
msg(
'restriction-level-all' )->text() => 0 ];
149 foreach ( $this->
getConfig()->
get(
'RestrictionLevels' ) as
$type ) {
152 $text = $this->
msg(
"restriction-level-$type" )->text();
158 if ( count( $m ) <= 2 ) {
162 foreach ( $m as $text =>
$type ) {
163 $options[ $text ] =
$type;
168 'options' => $options,
169 'label' => $this->
msg(
'restriction-level' )->text(),
176 return 'maintenance';