From: Aryeh Gregor Date: Tue, 12 Feb 2008 20:11:58 +0000 (+0000) Subject: Remove inexplicable $nt->isContentPage() check for rendering link colors in makeLinkO... X-Git-Tag: 1.31.0-rc.0~49511 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=61c57e7e22243010fc1f283c9465900bec45e014;p=lhc%2Fweb%2Fwiklou.git Remove inexplicable $nt->isContentPage() check for rendering link colors in makeLinkObj(). I don't know why there should be any difference, and there isn't for the other methods of rendering links. --- diff --git a/includes/Linker.php b/includes/Linker.php index cd9c31c70a..e260bdf3a7 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -251,17 +251,16 @@ class Linker { $retVal = $this->makeBrokenLinkObj( $nt, $text, $query, $trail, $prefix ); } else { $colour = ''; - if ( $nt->isContentPage() ) { - # FIXME: This is stupid, we should combine this query with - # the Title::getArticleID() query above. - $threshold = $wgUser->getOption('stubthreshold'); - $dbr = wfGetDB( DB_SLAVE ); - $s = $dbr->selectRow( - array( 'page' ), - array( 'page_len', 'page_is_redirect', 'page_namespace' ), - array( 'page_id' => $aid ), __METHOD__ ) ; - $colour = $this->getLinkColour( $s, $threshold ); - } + # FIXME: This is stupid, we should combine this query with + # the Title::getArticleID() query above. + $threshold = $wgUser->getOption('stubthreshold'); + $dbr = wfGetDB( DB_SLAVE ); + $s = $dbr->selectRow( + array( 'page' ), + array( 'page_len', 'page_is_redirect', 'page_namespace' ), + array( 'page_id' => $aid ), __METHOD__ ) ; + $colour = $this->getLinkColour( $s, $threshold ); + $retVal = $this->makeColouredLinkObj( $nt, $colour, $text, $query, $trail, $prefix ); } wfProfileOut( __METHOD__.'-immediate' );