From: Alex Z Date: Sat, 18 Jul 2009 22:49:31 +0000 (+0000) Subject: (bug 19814) - Interwiki links from file links - [[File:Foo.jpg|link=de:Test]] - are... X-Git-Tag: 1.31.0-rc.0~40845 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=95ef1b6fd6f6462e25436fdb150331ddaa5ce80b;p=lhc%2Fweb%2Fwiklou.git (bug 19814) - Interwiki links from file links - [[File:Foo.jpg|link=de:Test]] - are no longer recorded in the pagelinks table Also update Parser::makeImage() docs for the link option --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8918bd0a4e..ed2a513f60 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -287,6 +287,8 @@ this. Was used when mwEmbed was going to be an extension. database type * (bug 19759) successbox on Special:Preferences now correctly aligned on standard, nostalgia and cologneblue skin +* (bug 19814) interwiki links from file links ([[File:Foo.jpg|link=de:Test]]) + are no longer recorded in the pagelinks table == API changes in 1.16 == diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 5a674c5052..7f71aba312 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -4432,6 +4432,7 @@ class Parser # * upright reduce width for upright images, rounded to full __0 px # * border draw a 1px border around the image # * alt Text for HTML alt attribute (defaults to empty) + # * link Set the target of the image link. Can be external, interwiki, or local # vertical-align values (no % or length right now): # * baseline # * sub diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index 1b9ebf4872..38d21fb55b 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -101,6 +101,10 @@ class ParserOutput } function addLink( $title, $id = null ) { + if ( $title->isExternal() ) { + // Don't record interwikis in pagelinks + return; + } $ns = $title->getNamespace(); $dbk = $title->getDBkey(); if ( $ns == NS_MEDIA ) {