(bug 19814) - Interwiki links from file links - [[File:Foo.jpg|link=de:Test]] - are...
authorAlex Z <mrzman@users.mediawiki.org>
Sat, 18 Jul 2009 22:49:31 +0000 (22:49 +0000)
committerAlex Z <mrzman@users.mediawiki.org>
Sat, 18 Jul 2009 22:49:31 +0000 (22:49 +0000)
Also update Parser::makeImage() docs for the link option

RELEASE-NOTES
includes/parser/Parser.php
includes/parser/ParserOutput.php

index 8918bd0..ed2a513 100644 (file)
@@ -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 ==
 
index 5a674c5..7f71aba 100644 (file)
@@ -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
index 1b9ebf4..38d21fb 100644 (file)
@@ -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 ) {