From: Niklas Laxström Date: Fri, 6 Mar 2009 12:19:45 +0000 (+0000) Subject: * Modified wfMsg behaviour to do transform after substituting variables X-Git-Tag: 1.31.0-rc.0~42589 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=94fff4e22381c4050d65d22901535932de4da15c;p=lhc%2Fweb%2Fwiklou.git * Modified wfMsg behaviour to do transform after substituting variables * If this works, wfMsg should now work similarly to wfMsgExt with parsemag --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 2677b9393c..01ebdc781b 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -559,9 +559,13 @@ function wfMsgNoDBForContent( $key ) { * @return String: the requested message. */ function wfMsgReal( $key, $args, $useDB = true, $forContent=false, $transform = true ) { + global $wgMessageCache; wfProfileIn( __METHOD__ ); - $message = wfMsgGetKey( $key, $useDB, $forContent, $transform ); + $message = wfMsgGetKey( $key, $useDB, $forContent, false ); $message = wfMsgReplaceArgs( $message, $args ); + if( $transform && is_object( $wgMessageCache ) ) { + $message = $wgMessageCache->transform( $message, !$forContent ); + } wfProfileOut( __METHOD__ ); return $message; }