From 630ea0195f8a04282ea8e5080261652e75af4d25 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 6 Mar 2012 00:32:48 +0000 Subject: [PATCH] fix support for passing args to help-message(s), which was documented to be there but actually missing --- includes/HTMLForm.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index ac035cf2e1..b1ae4eaede 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -1086,7 +1086,9 @@ abstract class HTMLFormField { $helptext = null; if ( isset( $this->mParams['help-message'] ) ) { - $msg = wfMessage( $this->mParams['help-message'] ); + $helpMessage = (array)$this->mParams['help-message']; + $msg = wfMessage( array_shift( $helpMessage ), $helpMessage ); + if ( $msg->exists() ) { $helptext = $msg->parse(); } @@ -1095,7 +1097,9 @@ abstract class HTMLFormField { # a message key and additional parameters. This makes it impossible to pass # an array of message key foreach( $this->mParams['help-messages'] as $name ) { - $msg = wfMessage( $name ); + $helpMessage = (array)$name; + $msg = wfMessage( array_shift( $helpMessage ), $helpMessage ); + if( $msg->exists() ) { $helptext .= $msg->parse(); // append message } -- 2.20.1