(bug 5937) Register links from gallery captions with the parent parser output object...
authorRob Church <robchurch@users.mediawiki.org>
Sun, 14 May 2006 03:13:17 +0000 (03:13 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Sun, 14 May 2006 03:13:17 +0000 (03:13 +0000)
RELEASE-NOTES
includes/Parser.php

index 0efb057..ffef105 100644 (file)
@@ -259,6 +259,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 5683) Respect parser output marked as uncacheable when saving
 * (bug 5918) Links autonumbering now work for all defined protocols
 * (bug 5935) Improvement to German localisation (de)
+* (bug 5937) Register links from gallery captions with the parent parser output
+  object so that link tables receive those updates too
 
 == Compatibility ==
 
index 9a84053..5d27234 100644 (file)
@@ -3950,6 +3950,13 @@ 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();
        }