From 05f398352cc68498db4ad38232cb2f494ce99497 Mon Sep 17 00:00:00 2001 From: Fran Rogers Date: Sat, 9 Aug 2008 02:32:08 +0000 Subject: [PATCH] Don't add the 'stub' class to redlinks --- includes/Linker.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index bdb584ea7d..023b64142c 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -124,7 +124,9 @@ class Linker { if ( $t->isRedirect() ) { # Page is a redirect $colour = 'mw-redirect'; - } elseif ( $threshold > 0 && $t->getLength() < $threshold && MWNamespace::isContent( $t->getNamespace() ) ) { + } elseif ( $threshold > 0 && + $t->exists() && $t->getLength() < $threshold && + MWNamespace::isContent( $t->getNamespace() ) ) { # Page is a stub $colour = 'stub'; } @@ -270,7 +272,7 @@ class Linker { } elseif( $target->isContentPage() ) { # Check for stub. $threshold = $wgUser->getOption( 'stubthreshold' ); - if( $threshold > 0 and $target->getLength() < $threshold ) { + if( $threshold > 0 and $target->exists() and $target->getLength() < $threshold ) { $classes[] = 'stub'; } } -- 2.20.1