Use makeLink instead of makeKnownLink on Special:WhatLinksHere
authorDaimona Eaytoy <daimona.wiki@gmail.com>
Wed, 30 May 2018 15:35:02 +0000 (17:35 +0200)
committerLegoktm <legoktm@member.fsf.org>
Thu, 31 May 2018 21:23:05 +0000 (21:23 +0000)
Per I11e663cbce32b4199f16df6ed1e9b980630ece7a, makeKnownLink is used for
"linkshere" related messages. However, it always shows a blue link, even
if the page doesn't exist. Instead, use makeLink to get the old
behaviour back.

Bug: T195933
Change-Id: I92ad23dc7bd064a1a95a14f19cd3f134b4c98570

includes/specials/SpecialWhatlinkshere.php

index 0f3bea7..942346e 100644 (file)
@@ -209,7 +209,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage {
                                                $out->addHTML( $this->getFilterPanel() );
                                        }
                                        $msgKey = is_int( $namespace ) ? 'nolinkshere-ns-2' : 'nolinkshere-2';
                                                $out->addHTML( $this->getFilterPanel() );
                                        }
                                        $msgKey = is_int( $namespace ) ? 'nolinkshere-ns-2' : 'nolinkshere-2';
-                                       $link = $this->getLinkRenderer()->makeKnownLink(
+                                       $link = $this->getLinkRenderer()->makeLink(
                                                $this->target,
                                                null,
                                                [],
                                                $this->target,
                                                null,
                                                [],
@@ -285,7 +285,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage {
                                $out->addHTML( $this->whatlinkshereForm() );
                                $out->addHTML( $this->getFilterPanel() );
 
                                $out->addHTML( $this->whatlinkshereForm() );
                                $out->addHTML( $this->getFilterPanel() );
 
-                               $link = $this->getLinkRenderer()->makeKnownLink(
+                               $link = $this->getLinkRenderer()->makeLink(
                                        $this->target,
                                        null,
                                        [],
                                        $this->target,
                                        null,
                                        [],