r50387 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50386‎ | r50387 | r50388 >
Date:20:52, 9 May 2009
Author:catrope
Status:ok
Tags:
Comment:
Efficiency fix: don't call Title::isRedirect() on titles known not to exist; eliminates a lot of LinkCache::addLinkObj() queries for titles fed to Linker::makeBrokenLinkObj()
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -275,7 +275,7 @@
276276 }
277277
278278 # Note that redirects never count as stubs here.
279 - if ( $target->isRedirect() ) {
 279+ if ( !in_array( 'broken', $options ) && $target->isRedirect() ) {
280280 $classes[] = 'mw-redirect';
281281 } elseif( $target->isContentPage() ) {
282282 # Check for stub.

Status & tagging log