From: Fomafix Date: Wed, 23 Sep 2015 16:34:46 +0000 (+0000) Subject: SpecialNewpages: Add redirect=no only to links to redirects X-Git-Tag: 1.31.0-rc.0~9890^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=674426de3c6d97706582b3f9915ac45dc791b173;p=lhc%2Fweb%2Fwiklou.git SpecialNewpages: Add redirect=no only to links to redirects Since 2748c4091 all title links have redirect=no. This is requested in T16353. To satisfy T16353 it should be enough to add this only to links to redirects. Appending redirect=no to all links has the disadvantage of a duplicate link. This change adds redirect=no only to links to redirects. Change-Id: I33da0f1eadc5dfbc46820015622ee1a55acbfe21 --- diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index 251a8e0364..c8d4aa637c 100644 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -315,7 +315,7 @@ class SpecialNewpages extends IncludableSpecialPage { array() ); - $query = array( 'redirect' => 'no' ); + $query = $title->isRedirect() ? array( 'redirect' => 'no' ) : array(); // Linker::linkKnown() uses 'known' and 'noclasses' options. // This breaks the colouration for stubs.