if ( $hidelinks || $hidetrans || $hideredirs || $hideimages ) {
$out->addHTML( $this->getFilterPanel() );
}
- $errMsg = is_int( $namespace ) ? 'nolinkshere-ns' : 'nolinkshere';
- $out->addWikiMsg( $errMsg, $this->target->getPrefixedText() );
+ $msgKey = is_int( $namespace ) ? 'nolinkshere-ns-2' : 'nolinkshere-2';
+ $link = $this->getLinkRenderer()->makeKnownLink(
+ $this->target,
+ null,
+ [],
+ $this->target->isRedirect() ? [ 'redirect' => 'no' ] : []
+ );
+
+ $errMsg = $this->msg( $msgKey )->rawParams( $link )->parseAsBlock();
+ $out->addHTML( $errMsg );
$out->setStatusCode( 404 );
}
}
if ( !$this->including() ) {
$out->addHTML( $this->whatlinkshereForm() );
$out->addHTML( $this->getFilterPanel() );
- $out->addWikiMsg( 'linkshere', $this->target->getPrefixedText() );
+
+ $link = $this->getLinkRenderer()->makeKnownLink(
+ $this->target,
+ null,
+ [],
+ $this->target->isRedirect() ? [ 'redirect' => 'no' ] : []
+ );
+
+ $msg = $this->msg( 'linkshere-2' )->rawParams( $link )->parseAsBlock();
+ $out->addHTML( $msg );
$prevnext = $this->getPrevNext( $prevId, $nextId );
$out->addHTML( $prevnext );