From dc701270a6834a0f55c3280eb45e9acf4a79837a Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sun, 14 May 2006 03:13:17 +0000 Subject: [PATCH] (bug 5937) Register links from gallery captions with the parent parser output object so that link tables receive those updates too --- RELEASE-NOTES | 2 ++ includes/Parser.php | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0efb05786d..ffef1058dc 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/Parser.php b/includes/Parser.php index 9a8405355b..5d272345b9 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -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(); } -- 2.20.1