From: Brion Vibber Date: Wed, 13 Feb 2008 01:13:58 +0000 (+0000) Subject: Revert r30877 per discussion on wikitech-l: stubness coloring is enforced only on... X-Git-Tag: 1.31.0-rc.0~49499 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=59124a50027aa9ce14ad8eb60f1ffa8bc8af1809;p=lhc%2Fweb%2Fwiklou.git Revert r30877 per discussion on wikitech-l: stubness coloring is enforced only on content namespaces, as other namespaces have no requirement to be non-short; further this is enforced higher up already. --- diff --git a/includes/Linker.php b/includes/Linker.php index e260bdf3a7..cd9c31c70a 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -251,16 +251,17 @@ class Linker { $retVal = $this->makeBrokenLinkObj( $nt, $text, $query, $trail, $prefix ); } else { $colour = ''; - # 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 ); - + 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 ); + } $retVal = $this->makeColouredLinkObj( $nt, $colour, $text, $query, $trail, $prefix ); } wfProfileOut( __METHOD__.'-immediate' );