Revert r30877 per discussion on wikitech-l: stubness coloring is enforced only on...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 13 Feb 2008 01:13:58 +0000 (01:13 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 13 Feb 2008 01:13:58 +0000 (01:13 +0000)
includes/Linker.php

index e260bdf..cd9c31c 100644 (file)
@@ -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' );