Recommit r54081 after general revert r54735: The description message in $wgExtensionC...
[lhc/web/wiklou.git] / includes / specials / SpecialVersion.php
index 62cbac8..afbe0fb 100644 (file)
@@ -259,10 +259,17 @@ class SpecialVersion extends SpecialPage {
 
                # Look for a localized description
                if( isset( $descriptionMsg ) ) {
-                       $msg = wfMsg( $descriptionMsg );
-                       if ( !wfEmptyMsg( $descriptionMsg, $msg ) && $msg != '' ) {
-                               $description = $msg;
+                       if( is_array( $descriptionMsg ) ) {
+                               $descriptionMsgKey = $descriptionMsg[0]; // Get the message key
+                               array_shift( $descriptionMsg ); // Shift out the message key to get the parameters only
+                               array_map( "htmlspecialchars", $descriptionMsg ); // For sanity
+                               $msg = wfMsg( $descriptionMsgKey, $descriptionMsg );
+                       } else {
+                               $msg = wfMsg( $descriptionMsg );
                        }
+                       if ( !wfEmptyMsg( $descriptionMsg, $msg ) && $msg != '' ) {
+                               $description = $msg;
+                       }
                }
 
                if ( $haveSubversion ) {