From 6617510ba56d7c1662d2ea5d9a210cfc203a4e4a Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Wed, 30 Sep 2009 13:59:29 +0000 Subject: [PATCH] * Use styling 'white-space: nowrap' for restriction level label/input field too * Use commaList instead of hardcoded comma * Document two functions a bit --- includes/specials/SpecialProtectedpages.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php index 46602f6b04..f7f864d285 100644 --- a/includes/specials/SpecialProtectedpages.php +++ b/includes/specials/SpecialProtectedpages.php @@ -116,7 +116,10 @@ class ProtectedPagesForm { wfProfileOut( __METHOD__ ); - return '
  • ' . wfSpecialList( $link . $stxt, implode( $description_items, ', ' ) ) . $changeProtection . "
  • \n"; + return Html::rawElement( + 'li', + array(), + wfSpecialList( $link . $stxt, $wgLang->commaList( $description_items ) ) . $changeProtection ) . "\n"; } /** @@ -196,6 +199,8 @@ class ProtectedPagesForm { } /** + * Creates the input label of the restriction type + * @param $pr_type string Protection type * @return string Formatted HTML */ protected function getTypeMenu( $pr_type ) { @@ -224,6 +229,8 @@ class ProtectedPagesForm { } /** + * Creates the input label of the restriction level + * @param $pr_level string Protection level * @return string Formatted HTML */ protected function getLevelMenu( $pr_level ) { @@ -247,11 +254,11 @@ class ProtectedPagesForm { $options[] = Xml::option( $text, $type, $selected ); } - return - Xml::label( wfMsg('restriction-level') , $this->IdLevel ) . ' ' . + return "" . + Xml::label( wfMsg( 'restriction-level' ) , $this->IdLevel ) . ' ' . Xml::tags( 'select', array( 'id' => $this->IdLevel, 'name' => $this->IdLevel ), - implode( "\n", $options ) ); + implode( "\n", $options ) ) . ""; } } -- 2.20.1