From d16f4b8850bcbffe3b3660418d6cd0ed79d03255 Mon Sep 17 00:00:00 2001 From: Happy-melon Date: Mon, 27 Jun 2011 18:05:09 +0000 Subject: [PATCH] (bug 29511) block dropdown reasons should be in wiki content language. --- includes/HTMLForm.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index ac1690d86c..1d2c6626b7 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -1568,16 +1568,19 @@ class HTMLSelectAndOtherField extends HTMLSelectField { 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 @@ class HTMLSelectAndOtherField extends HTMLSelectField { */ public static function parseMessage( $string, $otherName=null ) { if( $otherName === null ){ - $otherName = wfMsg( 'htmlform-selectorother-other' ); + $otherName = wfMessage( 'htmlform-selectorother-other' )->escaped(); } $optgroup = false; -- 2.20.1