X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialWhatlinkshere.php;h=439b6ab3cba92201366b8d4dbd27fd8f02549c01;hb=02abae3248b9273be6b312aeb9f1cae81a3ac6c0;hp=334985425d639b3fdf13452b514def7752b6b9f7;hpb=20f0da437eeed7e8ca28be911f53535be82889a1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index 334985425d..439b6ab3cb 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -378,11 +378,15 @@ class SpecialWhatLinksHere extends IncludableSpecialPage { $linkRenderer = $this->getLinkRenderer(); + if ( $text !== null ) { + $text = new HtmlArmor( $text ); + } + // always show a "<- Links" link $links = [ 'links' => $linkRenderer->makeKnownLink( $title, - new HtmlArmor( $text ), + $text, [], [ 'target' => $target->getPrefixedText() ] ), @@ -395,9 +399,13 @@ class SpecialWhatLinksHere extends IncludableSpecialPage { // check, if the content model is editable through action=edit ContentHandler::getForTitle( $target )->supportsDirectEditing() ) { + if ( $editText !== null ) { + $editText = new HtmlArmor( $editText ); + } + $links['edit'] = $linkRenderer->makeKnownLink( $target, - new HtmlArmor( $editText ), + $editText, [], [ 'action' => 'edit' ] ); @@ -408,9 +416,13 @@ class SpecialWhatLinksHere extends IncludableSpecialPage { } function makeSelfLink( $text, $query ) { + if ( $text !== null ) { + $text = new HtmlArmor( $text ); + } + return $this->getLinkRenderer()->makeKnownLink( $this->selfTitle, - new HtmlArmor( $text ), + $text, [], $query );