];
$on['rd_namespace'] = $target->getNamespace();
// Inner LIMIT is 2X in case of stale backlinks with wrong namespaces
- $subQuery = $dbr->selectSQLText(
+ $subQuery = $dbr->buildSelectSubquery(
[ $table, 'redirect', 'page' ],
[ $fromCol, 'rd_from' ],
$conds[$table],
]
);
return $dbr->select(
- [ 'page', 'temp_backlink_range' => "($subQuery)" ],
+ [ 'page', 'temp_backlink_range' => $subQuery ],
[ 'page_id', 'page_namespace', 'page_title', 'rd_from', 'page_is_redirect' ],
[],
__CLASS__ . '::showIndirectLinks',
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 );