http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90895
Revision: 90895
Author: happy-melon
Date: 2011-06-27 18:05:09 +0000 (Mon, 27 Jun 2011)
Log Message:
-----------
(bug 29511) block dropdown reasons should be in wiki content language.
Modified Paths:
--------------
trunk/phase3/includes/HTMLForm.php
Modified: trunk/phase3/includes/HTMLForm.php
===================================================================
--- trunk/phase3/includes/HTMLForm.php 2011-06-27 17:52:39 UTC (rev 90894)
+++ trunk/phase3/includes/HTMLForm.php 2011-06-27 18:05:09 UTC (rev 90895)
@@ -1568,16 +1568,19 @@
function __construct( $params ) {
if ( array_key_exists( 'other', $params ) ) {
} elseif( array_key_exists( 'other-message', $params ) ){
- $params['other'] = wfMsg( $params['other-message'] );
+ $params['other'] = wfMessage( $params['other-message']
)->escaped();
} else {
- $params['other'] = wfMsg(
'htmlform-selectorother-other' );
+ $params['other'] = null;
}
if ( array_key_exists( 'options', $params ) ) {
# Options array already specified
} elseif( array_key_exists( 'options-message', $params ) ){
# Generate options array from a system message
- $params['options'] = self::parseMessage( wfMsg(
$params['options-message'], $params['other'] ) );
+ $params['options'] = self::parseMessage(
+ wfMessage( $params['options-message']
)->inContentLanguage()->escaped(),
+ $params['other']
+ );
} else {
# Sulk
throw new MWException( 'HTMLSelectAndOtherField called
without any options' );
@@ -1596,7 +1599,7 @@
*/
public static function parseMessage( $string, $otherName=null ) {
if( $otherName === null ){
- $otherName = wfMsg( 'htmlform-selectorother-other' );
+ $otherName = wfMessage( 'htmlform-selectorother-other'
)->escaped();
}
$optgroup = false;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs