class SpecialProtectedpages extends SpecialPage {
protected $IdLevel = 'level';
- protected $IdType = 'type';
+ protected $IdType = 'type';
public function __construct() {
parent::__construct( 'Protectedpages' );
}
$title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
+ if( !$title ) {
+ wfProfileOut( __METHOD__ );
+ return Html::rawElement( 'li', array(),
+ Html::element( 'span', array( 'class' => 'mw-invalidtitle' ),
+ Linker::getInvalidTitleDescription( $this->getContext(), $row->page_namespace, $row->page_title ) ) ) . "\n";
+ }
+
$link = Linker::link( $title );
- $description_items = array ();
+ $description_items = array();
$protType = $this->msg( 'restriction-level-' . $row->pr_level )->escaped();
/**
* @param $namespace Integer
- * @param $type String: restriction type
- * @param $level String: restriction level
- * @param $sizetype String: "min" or "max"
+ * @param string $type restriction type
+ * @param string $level restriction level
+ * @param string $sizetype "min" or "max"
* @param $size Integer
* @param $indefOnly Boolean: only indefinie protection
* @param $cascadeOnly Boolean: only cascading protection
'all' => '',
'label' => $this->msg( 'namespace' )->text()
), array(
- 'name' => 'namespace',
- 'id' => 'namespace',
+ 'name' => 'namespace',
+ 'id' => 'namespace',
'class' => 'namespaceselector',
)
)
}
/**
+ * @param bool $indefOnly
* @return string Formatted HTML
*/
protected function getExpiryCheck( $indefOnly ) {
- return
- Xml::checkLabel( $this->msg( 'protectedpages-indef' )->text(), 'indefonly', 'indefonly', $indefOnly ) . "\n";
+ return Xml::checkLabel( $this->msg( 'protectedpages-indef' )->text(), 'indefonly', 'indefonly', $indefOnly ) . "\n";
}
/**
+ * @param bool $cascadeOnly
* @return string Formatted HTML
*/
protected function getCascadeCheck( $cascadeOnly ) {
- return
- Xml::checkLabel( $this->msg( 'protectedpages-cascade' )->text(), 'cascadeonly', 'cascadeonly', $cascadeOnly ) . "\n";
+ return Xml::checkLabel( $this->msg( 'protectedpages-cascade' )->text(), 'cascadeonly', 'cascadeonly', $cascadeOnly ) . "\n";
}
/**
+ * @param string $sizetype "min" or "max"
+ * @param mixed $size
* @return string Formatted HTML
*/
protected function getSizeLimit( $sizetype, $size ) {
$max = $sizetype === 'max';
- return
- Xml::radioLabel( $this->msg( 'minimum-size' )->text(), 'sizetype', 'min', 'wpmin', !$max ) .
+ return Xml::radioLabel( $this->msg( 'minimum-size' )->text(), 'sizetype', 'min', 'wpmin', !$max ) .
' ' .
Xml::radioLabel( $this->msg( 'maximum-size' )->text(), 'sizetype', 'max', 'wpmax', $max ) .
' ' .
array( 'id' => $this->IdLevel, 'name' => $this->IdLevel ),
implode( "\n", $options ) ) . "</span>";
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
/**