From: Anders Wegge Jakobsen Date: Tue, 14 Jun 2005 16:04:00 +0000 (+0000) Subject: (bug 2171) The parser is not totally reentrant X-Git-Tag: 1.5.0beta1~191 X-Git-Url: https://git.cyclocoop.org/admin/%7B%24admin_url%7Dmembres/%24self&var_mode_objet=%24skel&var_mode_affiche=squelette&var_mode_ligne=%24ligne?a=commitdiff_plain;h=a178720a2c6d598935a6b6e699d209dc9ea6e8be;p=lhc%2Fweb%2Fwiklou.git (bug 2171) The parser is not totally reentrant --- 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 );