- $action = htmlspecialchars( wfScript() );
- $title = $this->getPageTitle();
- $special = htmlspecialchars( $title->getPrefixedDBkey() );
-
- return "<form action=\"$action\" method=\"get\">\n" .
- '<fieldset>' .
- Xml::element( 'legend', [], $this->msg( 'protectedtitles' )->text() ) .
- Html::hidden( 'title', $special ) . " \n" .
- $this->getNamespaceMenu( $namespace ) . " \n" .
- $this->getLevelMenu( $level ) . " \n" .
- " " . Xml::submitButton( $this->msg( 'protectedtitles-submit' )->text() ) . "\n" .
- "</fieldset></form>";
- }
-
- /**
- * Prepare the namespace filter drop-down; standard namespace
- * selector, sans the MediaWiki namespace
- *
- * @param string|null $namespace Pre-select namespace
- * @return string
- */
- function getNamespaceMenu( $namespace = null ) {
- return Html::namespaceSelector(
- [
- 'selected' => $namespace,
- 'all' => '',
- 'label' => $this->msg( 'namespace' )->text()
- ], [