X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialWhatlinkshere.php;h=6f91c46f86168356c55f195a8df68437cee2757e;hb=04a8781b3ea494cd7944e104863b3eaa34a1e733;hp=1ead290f2a750fafa6ed72a0d6de86fcf9f72c72;hpb=e3f6c10d87732c0c8a9bbd7bb57b6c964b92e29a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index 1ead290f2a..6f91c46f86 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -21,6 +21,8 @@ * @todo Use some variant of Pager or something; the pagination here is lousy. */ +use Wikimedia\Rdbms\IDatabase; + /** * Implements Special:Whatlinkshere * @@ -327,7 +329,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage { $query = []; } - $link = Linker::linkKnown( + $link = $this->getLinkRenderer()->makeKnownLink( $nt, null, $row->page_is_redirect ? [ 'class' => 'mw-redirect' ] : [], @@ -376,9 +378,15 @@ class SpecialWhatLinksHere extends IncludableSpecialPage { $title = $this->getPageTitle(); } + $linkRenderer = $this->getLinkRenderer(); + + if ( $text !== null ) { + $text = new HtmlArmor( $text ); + } + // always show a "<- Links" link $links = [ - 'links' => Linker::linkKnown( + 'links' => $linkRenderer->makeKnownLink( $title, $text, [], @@ -393,7 +401,11 @@ class SpecialWhatLinksHere extends IncludableSpecialPage { // check, if the content model is editable through action=edit ContentHandler::getForTitle( $target )->supportsDirectEditing() ) { - $links['edit'] = Linker::linkKnown( + if ( $editText !== null ) { + $editText = new HtmlArmor( $editText ); + } + + $links['edit'] = $linkRenderer->makeKnownLink( $target, $editText, [], @@ -406,7 +418,11 @@ class SpecialWhatLinksHere extends IncludableSpecialPage { } function makeSelfLink( $text, $query ) { - return Linker::linkKnown( + if ( $text !== null ) { + $text = new HtmlArmor( $text ); + } + + return $this->getLinkRenderer()->makeKnownLink( $this->selfTitle, $text, [],