From b41b3abadf0777a1d13e5692782977f0400a9436 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sun, 7 May 2006 18:51:26 +0000 Subject: [PATCH] Fix foul-up with et al., wfMsgExt and all sorts of other exciting fun. --- includes/GlobalFunctions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 5d9627ace6..3252fba201 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -579,7 +579,12 @@ function wfMsgExt( $key, $options ) { $string = $m[1]; } } elseif ( in_array('parsemag', $options) ) { - $string = $wgParser->transformMsg($string, $wgMsgParserOptions); + global $wgTitle; + $parser = new Parser(); + $parserOptions = new ParserOptions(); + $parserOptions->setInterfaceMessage( true ); + $parser->startExternalParse( $wgTitle, $parserOptions, OT_MSG ); + $string = $parser->transformMsg( $string, $wgMsgParserOptions ); } if ( in_array('escape', $options) ) { -- 2.20.1