*If you are going to check $s->page_namespace, at least select it first ;) (Nikerabbi...
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 24 Nov 2007 08:20:28 +0000 (08:20 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 24 Nov 2007 08:20:28 +0000 (08:20 +0000)
includes/Linker.php

index b965fdc..c074853 100644 (file)
@@ -254,10 +254,9 @@ class Linker {
                                                $dbr = wfGetDB( DB_SLAVE );
                                                $s = $dbr->selectRow(
                                                        array( 'page' ),
-                                                       array( 'page_len',
-                                                              'page_is_redirect' ),
+                                                       array( 'page_len', 'page_is_redirect', 'page_namespace' ),
                                                        array( 'page_id' => $aid ), __METHOD__ ) ;
-                                               $colour=$this->getLinkColour( $s, $threshold );
+                                               $colour = $this->getLinkColour( $s, $threshold );
                                        }
                                }
                                $retVal = $this->makeColouredLinkObj( $nt, $colour, $text, $query, $trail, $prefix );