Index: trunk/phase3/includes/Parser.php |
— | — | @@ -3904,10 +3904,6 @@ |
3905 | 3905 | * 'A tree'. |
3906 | 3906 | */ |
3907 | 3907 | function renderImageGallery( $text ) { |
3908 | | - # Setup the parser |
3909 | | - $parserOptions = new ParserOptions; |
3910 | | - $localParser = new Parser(); |
3911 | | - |
3912 | 3908 | $ig = new ImageGallery(); |
3913 | 3909 | $ig->setShowBytes( false ); |
3914 | 3910 | $ig->setShowFilename( false ); |
— | — | @@ -3933,7 +3929,12 @@ |
3934 | 3930 | $label = ''; |
3935 | 3931 | } |
3936 | 3932 | |
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 | + ); |
3938 | 3939 | $html = $pout->getText(); |
3939 | 3940 | |
3940 | 3941 | $ig->add( new Image( $nt ), $html ); |
— | — | @@ -3942,13 +3943,6 @@ |
3943 | 3944 | if ( $nt->getNamespace() == NS_IMAGE ) { |
3944 | 3945 | $this->mOutput->addImage( $nt->getDBkey() ); |
3945 | 3946 | } |
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 | | - |
3953 | 3947 | } |
3954 | 3948 | return $ig->toHTML(); |
3955 | 3949 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -407,6 +407,7 @@ |
408 | 408 | in behavior based on the order tags are loaded. |
409 | 409 | * (bug 885) Pre-save transform no longer silently appends close tags |
410 | 410 | * Pre-save transform no longer changes the case of close tags |
| 411 | +* (bug 6164) Fix regression with <gallery> resetting <ref> state |
411 | 412 | |
412 | 413 | |
413 | 414 | == Compatibility == |