From 94fff4e22381c4050d65d22901535932de4da15c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Fri, 6 Mar 2009 12:19:45 +0000 Subject: [PATCH] * Modified wfMsg behaviour to do transform after substituting variables * If this works, wfMsg should now work similarly to wfMsgExt with parsemag --- includes/GlobalFunctions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.20.1