https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113113

Revision: 113113
Author:   jeroendedauw
Date:     2012-03-06 00:32:48 +0000 (Tue, 06 Mar 2012)
Log Message:
-----------
fix support for passing args to help-message(s), which was documented to be 
there but actually missing

Modified Paths:
--------------
    trunk/phase3/includes/HTMLForm.php

Modified: trunk/phase3/includes/HTMLForm.php
===================================================================
--- trunk/phase3/includes/HTMLForm.php  2012-03-06 00:26:48 UTC (rev 113112)
+++ trunk/phase3/includes/HTMLForm.php  2012-03-06 00:32:48 UTC (rev 113113)
@@ -1086,7 +1086,9 @@
                $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 @@
                        # 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
                                }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to