r53463 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53462‎ | r53463 | r53464 >
Date:22:49, 18 July 2009
Author:mrzman
Status:ok
Tags:
Comment:
(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
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/includes/parser/ParserOutput.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -4432,6 +4432,7 @@
44334433 # * upright reduce width for upright images, rounded to full __0 px
44344434 # * border draw a 1px border around the image
44354435 # * alt Text for HTML alt attribute (defaults to empty)
 4436+ # * link Set the target of the image link. Can be external, interwiki, or local
44364437 # vertical-align values (no % or length right now):
44374438 # * baseline
44384439 # * sub
Index: trunk/phase3/includes/parser/ParserOutput.php
@@ -101,6 +101,10 @@
102102 }
103103
104104 function addLink( $title, $id = null ) {
 105+ if ( $title->isExternal() ) {
 106+ // Don't record interwikis in pagelinks
 107+ return;
 108+ }
105109 $ns = $title->getNamespace();
106110 $dbk = $title->getDBkey();
107111 if ( $ns == NS_MEDIA ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -287,6 +287,8 @@
288288 database type
289289 * (bug 19759) successbox on Special:Preferences now correctly aligned on
290290 standard, nostalgia and cologneblue skin
 291+* (bug 19814) interwiki links from file links ([[File:Foo.jpg|link=de:Test]])
 292+ are no longer recorded in the pagelinks table
291293
292294 == API changes in 1.16 ==
293295

Status & tagging log