From a178720a2c6d598935a6b6e699d209dc9ea6e8be Mon Sep 17 00:00:00 2001 From: Anders Wegge Jakobsen Date: Tue, 14 Jun 2005 16:04:00 +0000 Subject: [PATCH] (bug 2171) The parser is not totally reentrant --- RELEASE-NOTES | 3 ++- includes/Parser.php | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f504ed0418..d13451d507 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -284,7 +284,8 @@ Various bugfixes, small features, and a few experimental things: when the default charset is set to utf8 * (bug 2400) don't send confirmation mail on account creation if $wgEmailAuthentication is false. - +* (bug 2172) Fix problem with nowiki beeing replaced by marker strings + when a template with a gallery was used. === Caveats === diff --git a/includes/Parser.php b/includes/Parser.php index 0824335b34..11677117f0 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3102,9 +3102,10 @@ class Parser */ function renderImageGallery( $text ) { # Setup the parser - global $wgUser, $wgParser, $wgTitle; + global $wgUser, $wgTitle; $parserOptions = ParserOptions::newFromUser( $wgUser ); - + $localParser = new Parser(); + global $wgLinkCache; $ig = new ImageGallery(); $ig->setShowBytes( false ); @@ -3130,7 +3131,7 @@ class Parser $label = ''; } - $html = $wgParser->parse( $label , $wgTitle, $parserOptions ); + $html = $localParser->parse( $label , $wgTitle, $parserOptions ); $html = $html->mText; $ig->add( new Image( $nt ), $html ); -- 2.20.1