r14532 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14531‎ | r14532 | r14533 >
Date:21:22, 1 June 2006
Author:brion
Status:old
Tags:
Comment:
* (bug 6164) Fix regression with <gallery> resetting <ref> state
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -3904,10 +3904,6 @@
39053905 * 'A tree'.
39063906 */
39073907 function renderImageGallery( $text ) {
3908 - # Setup the parser
3909 - $parserOptions = new ParserOptions;
3910 - $localParser = new Parser();
3911 -
39123908 $ig = new ImageGallery();
39133909 $ig->setShowBytes( false );
39143910 $ig->setShowFilename( false );
@@ -3933,7 +3929,12 @@
39343930 $label = '';
39353931 }
39363932
3937 - $pout = $localParser->parse( $label , $this->mTitle, $parserOptions );
 3933+ $pout = $this->parse( $label,
 3934+ $this->mTitle,
 3935+ $this->mOptions,
 3936+ false, // Strip whitespace...?
 3937+ false // Don't clear state!
 3938+ );
39383939 $html = $pout->getText();
39393940
39403941 $ig->add( new Image( $nt ), $html );
@@ -3942,13 +3943,6 @@
39433944 if ( $nt->getNamespace() == NS_IMAGE ) {
39443945 $this->mOutput->addImage( $nt->getDBkey() );
39453946 }
3946 -
3947 - # Register links with the parent parser
3948 - foreach( $pout->getLinks() as $ns => $keys ) {
3949 - foreach( $keys as $dbk => $id )
3950 - $this->mOutput->addLink( Title::makeTitle( $ns, $dbk ), $id );
3951 - }
3952 -
39533947 }
39543948 return $ig->toHTML();
39553949 }
Index: trunk/phase3/RELEASE-NOTES
@@ -407,6 +407,7 @@
408408 in behavior based on the order tags are loaded.
409409 * (bug 885) Pre-save transform no longer silently appends close tags
410410 * Pre-save transform no longer changes the case of close tags
 411+* (bug 6164) Fix regression with <gallery> resetting <ref> state
411412
412413
413414 == Compatibility ==

Follow-up revisions

RevisionCommit summaryAuthorDate
r16954* (bug 6164) Avoid smashing Cite state if message transformation triggers...brion01:07, 12 October 2006
r35828Revert r35819 -- broke thumbnailing....brion23:46, 3 June 2008

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r14531Add regression test for bug 6164brion21:11, 1 June 2006

Status & tagging log