r29834 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29833‎ | r29834 | r29835 >
Date:06:16, 16 January 2008
Author:brion
Status:old
Tags:
Comment:
Don't register internal links for specials or interwikis on #ifexist lookup.
They all return false anyway, but this avoids bogus link table entries.
(Similar issue as ImageMap bug 12651)
Modified paths:
  • /trunk/extensions/ParserFunctions/ParserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ParserFunctions/ParserFunctions.php
@@ -313,6 +313,13 @@
314314 }
315315 $parser->mOutput->addImage($file->getName());
316316 return $file->exists() ? $then : $else;
 317+ } elseif( $title->getNamespace() == NS_SPECIAL || $title->isExternal() ) {
 318+ // Specials and interwikis...
 319+ // Currently these always return false, though perhaps
 320+ // they should be able to do some checks?
 321+ //
 322+ // In any case, don't register them in local link tables as below...
 323+ return $else;
317324 } else {
318325 $pdbk = $title->getPrefixedDBkey();
319326 $lc = LinkCache::singleton();

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r29833* (bug 12651) Don't record special:, media:, and interwiki links in ImageMap ...brion06:08, 16 January 2008

Status & tagging log