From: Ævar Arnfjörð Bjarmason Date: Mon, 28 Nov 2005 01:13:05 +0000 (+0000) Subject: * When wfMsg*NoTrans() was called the message cache transformation was X-Git-Tag: 1.6.0~1104 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/modifier.php?a=commitdiff_plain;h=248b02f6e61346454f9b01436cfbbd0bddb7905d;p=lhc%2Fweb%2Fwiklou.git * When wfMsg*NoTrans() was called the message cache transformation was disabled permanently for the session, not just for that one message call --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 52a0e3388e..4a5e608122 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -393,6 +393,8 @@ function wfMsgGetKey( $key, $useDB, $forContent = false, $transform = true ) { global $wgContLang, $wgLanguageCode; global $wgMessageCache, $wgLang; + $transstat = $wgMessageCache->getTransform(); + if( is_object( $wgMessageCache ) ) { if ( ! $transform ) $wgMessageCache->disableTransform(); @@ -418,6 +420,10 @@ function wfMsgGetKey( $key, $useDB, $forContent = false, $transform = true ) { $message = $wgParser->transformMsg($message, $wgMsgParserOptions); } } + + if ( ! $transform ) + $wgMessageCache->setTransform( $transstat ); + return $message; }