Use Linker::link() instead of Linker::linkKnown() when having options
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Fri, 12 Oct 2012 06:36:47 +0000 (08:36 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Fri, 12 Oct 2012 06:36:47 +0000 (08:36 +0200)
Linker::linkKnown() with options is useless and confusing, since in
this case options set by Linker::linkKnown() are simply overridden.

Change-Id: I079f0ed5a7365e2dd22b8de27d0d36ca859b4bf4

includes/specials/SpecialNewpages.php

index bd7b41f..08d1517 100644 (file)
@@ -325,12 +325,13 @@ class SpecialNewpages extends IncludableSpecialPage {
                        $query['rcid'] = $result->rc_id;
                }
 
-               $plink = Linker::linkKnown(
+               // Linker::linkKnown() uses 'known' and 'noclasses' options. This breaks the colouration for stubs.
+               $plink = Linker::link(
                        $title,
                        null,
                        array( 'class' => 'mw-newpages-pagename' ),
                        $query,
-                       array( 'known' ) // Set explicitly to avoid the default of 'known','noclasses'. This breaks the colouration for stubs
+                       array( 'known' )
                );
                $histLink = Linker::linkKnown(
                        $title,