From: Brion Vibber Date: Thu, 1 Jun 2006 21:22:05 +0000 (+0000) Subject: * (bug 6164) Fix regression with resetting state X-Git-Tag: 1.31.0-rc.0~56927 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=2a368380cf62ebafba5491cb50f94801196c8307;p=lhc%2Fweb%2Fwiklou.git * (bug 6164) Fix regression with resetting state --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f16adbeb38..438af19ca3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -407,6 +407,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN in behavior based on the order tags are loaded. * (bug 885) Pre-save transform no longer silently appends close tags * Pre-save transform no longer changes the case of close tags +* (bug 6164) Fix regression with resetting state == Compatibility == diff --git a/includes/Parser.php b/includes/Parser.php index f969f7b910..eb7a78df22 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3904,10 +3904,6 @@ class Parser * 'A tree'. */ function renderImageGallery( $text ) { - # Setup the parser - $parserOptions = new ParserOptions; - $localParser = new Parser(); - $ig = new ImageGallery(); $ig->setShowBytes( false ); $ig->setShowFilename( false ); @@ -3933,7 +3929,12 @@ class Parser $label = ''; } - $pout = $localParser->parse( $label , $this->mTitle, $parserOptions ); + $pout = $this->parse( $label, + $this->mTitle, + $this->mOptions, + false, // Strip whitespace...? + false // Don't clear state! + ); $html = $pout->getText(); $ig->add( new Image( $nt ), $html ); @@ -3942,13 +3943,6 @@ class Parser if ( $nt->getNamespace() == NS_IMAGE ) { $this->mOutput->addImage( $nt->getDBkey() ); } - - # Register links with the parent parser - foreach( $pout->getLinks() as $ns => $keys ) { - foreach( $keys as $dbk => $id ) - $this->mOutput->addLink( Title::makeTitle( $ns, $dbk ), $id ); - } - } return $ig->toHTML(); }