From: Niklas Laxström Date: Thu, 3 May 2007 14:32:52 +0000 (+0000) Subject: * Fix missing and double escaping X-Git-Tag: 1.31.0-rc.0~53106 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=748c7b46ef34989abddb721aaa0fe6ba72a326ed;p=lhc%2Fweb%2Fwiklou.git * Fix missing and double escaping * Don't hardcode colons * Xml functions, fixed broken labels --- diff --git a/includes/SpecialProtectedpages.php b/includes/SpecialProtectedpages.php index 59a52646a3..ba60054783 100644 --- a/includes/SpecialProtectedpages.php +++ b/includes/SpecialProtectedpages.php @@ -9,6 +9,10 @@ * @addtogroup SpecialPage */ class ProtectedPagesForm { + + protected $IdLevel = 'level'; + protected $IdType = 'type'; + function showList( $msg = '' ) { global $wgOut, $wgRequest; @@ -22,8 +26,8 @@ class ProtectedPagesForm { Title::purgeExpiredRestrictions(); } - $type = $wgRequest->getVal( 'type' ); - $level = $wgRequest->getVal( 'level' ); + $type = $wgRequest->getVal( $this->IdType ); + $level = $wgRequest->getVal( $this->IdLevel ); $sizetype = $wgRequest->getVal( 'sizetype' ); $size = $wgRequest->getIntOrNull( 'size' ); $NS = $wgRequest->getIntOrNull( 'namespace' ); @@ -125,7 +129,7 @@ class ProtectedPagesForm { $out .= " ".Xml::radio( 'sizetype', 'max', ($sizetype=='max'), array('id' => 'wpmax') ); $out .= Xml::label( wfMsg("maximum-size"), 'wpmax' ); $out .= " ".Xml::input('size', 9, $size, array( 'id' => 'wpsize' ) ); - $out .= ' '.wfMsg('pagesize'); + $out .= ' '.wfMsgHtml('pagesize'); return $out; } @@ -134,25 +138,28 @@ class ProtectedPagesForm { * @private */ function getTypeMenu( $pr_type ) { - global $wgRestrictionTypes, $wgUser; + global $wgRestrictionTypes; - $out = "'; - return ": " . $out; + return + Xml::label( wfMsg('restriction-type') , $this->IdType ) . ' ' . + Xml::tags( 'select', + array( 'id' => $this->IdType, 'name' => $this->IdType ), + implode( "\n", $options ) ); } /** @@ -160,30 +167,30 @@ class ProtectedPagesForm { * @private */ function getLevelMenu( $pr_level ) { - global $wgRestrictionLevels, $wgUser; - - $out = "'; - return ": " . $out; + return + Xml::label( wfMsg('restriction-level') , $this->IdLevel ) . ' ' . + Xml::tags( 'select', + array( 'id' => $this->IdLevel, 'name' => $this->IdLevel ), + implode( "\n", $options ) ); } } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index d002e3d468..3f7a8dff89 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1835,8 +1835,8 @@ Here are the current settings for the page $1:', 'protect-summary-cascade' => 'cascading', 'protect-expiring' => 'expires $1 (UTC)', 'protect-cascade' => 'Cascading protection - protect any pages included in this page.', -'restriction-type' => 'Permission', -'restriction-level' => 'Restriction level', +'restriction-type' => 'Permission:', +'restriction-level' => 'Restriction level:', 'minimum-size' => 'Min size', 'maximum-size' => 'Max size', 'pagesize' => '(bytes)', diff --git a/languages/messages/MessagesFi.php b/languages/messages/MessagesFi.php index 32daed931e..a24bd22fc8 100644 --- a/languages/messages/MessagesFi.php +++ b/languages/messages/MessagesFi.php @@ -1316,7 +1316,7 @@ Palaute ja lisäapu osoitteessa: 'restriction-level' => 'Suojaus', 'minimum-size' => 'Vähimmäiskoko', 'maximum-size' => 'Enimmäiskoko', -'pagesize' => '(tavuina)', +'pagesize' => 'tavua', # Restrictions (nouns) 'restriction-edit' => 'muokkaus', @@ -1357,7 +1357,7 @@ Palaute ja lisäapu osoitteessa: 'undelete-no-results' => 'Poistoarkistosta ei löytynyt haettuja sivuja.', # Namespace form on various pages -'namespace' => 'Nimiavaruus:', +'namespace' => 'Nimiavaruus', 'invert' => 'Käännä nimiavaruusvalinta päinvastaiseksi', # Contributions