From: Fran Rogers Date: Sat, 9 Aug 2008 02:32:08 +0000 (+0000) Subject: Don't add the 'stub' class to redlinks X-Git-Tag: 1.31.0-rc.0~45989 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/rappels.php?a=commitdiff_plain;h=05f398352cc68498db4ad38232cb2f494ce99497;p=lhc%2Fweb%2Fwiklou.git Don't add the 'stub' class to redlinks --- 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'; } }