// Force JOIN order per T106682 to avoid large filesorts
[ 'ORDER BY' => $fromCol, 'LIMIT' => 2 * $queryLimit, 'STRAIGHT_JOIN' ],
[
- 'page' => [ 'INNER JOIN', "$fromCol = page_id" ],
+ 'page' => [ 'JOIN', "$fromCol = page_id" ],
'redirect' => [ 'LEFT JOIN', $on ]
]
);
[],
__CLASS__ . '::showIndirectLinks',
[ 'ORDER BY' => 'page_id', 'LIMIT' => $queryLimit ],
- [ 'page' => [ 'INNER JOIN', "$fromCol = page_id" ] ]
+ [ 'page' => [ 'JOIN', "$fromCol = page_id" ] ]
);
};
&& ( $hidetrans || !$tlRes->numRows() )
&& ( $hideimages || !$ilRes->numRows() )
) {
- if ( $level == 0 ) {
- if ( !$this->including() ) {
- $out->addHTML( $this->whatlinkshereForm() );
-
- // Show filters only if there are links
- if ( $hidelinks || $hidetrans || $hideredirs || $hideimages ) {
- $out->addHTML( $this->getFilterPanel() );
- }
- $msgKey = is_int( $namespace ) ? 'nolinkshere-ns' : 'nolinkshere';
- $link = $this->getLinkRenderer()->makeLink(
- $this->target,
- null,
- [],
- $this->target->isRedirect() ? [ 'redirect' => 'no' ] : []
- );
-
- $errMsg = $this->msg( $msgKey )
- ->params( $this->target->getPrefixedText() )
- ->rawParams( $link )
- ->parseAsBlock();
- $out->addHTML( $errMsg );
- $out->setStatusCode( 404 );
+ if ( $level == 0 && !$this->including() ) {
+ $out->addHTML( $this->whatlinkshereForm() );
+
+ // Show filters only if there are links
+ if ( $hidelinks || $hidetrans || $hideredirs || $hideimages ) {
+ $out->addHTML( $this->getFilterPanel() );
}
+ $msgKey = is_int( $namespace ) ? 'nolinkshere-ns' : 'nolinkshere';
+ $link = $this->getLinkRenderer()->makeLink(
+ $this->target,
+ null,
+ [],
+ $this->target->isRedirect() ? [ 'redirect' => 'no' ] : []
+ );
+
+ $errMsg = $this->msg( $msgKey )
+ ->params( $this->target->getPrefixedText() )
+ ->rawParams( $link )
+ ->parseAsBlock();
+ $out->addHTML( $errMsg );
+ $out->setStatusCode( 404 );
}
return;
}
$lb->execute();
- if ( $level == 0 ) {
- if ( !$this->including() ) {
- $out->addHTML( $this->whatlinkshereForm() );
- $out->addHTML( $this->getFilterPanel() );
+ if ( $level == 0 && !$this->including() ) {
+ $out->addHTML( $this->whatlinkshereForm() );
+ $out->addHTML( $this->getFilterPanel() );
- $link = $this->getLinkRenderer()->makeLink(
- $this->target,
- null,
- [],
- $this->target->isRedirect() ? [ 'redirect' => 'no' ] : []
- );
+ $link = $this->getLinkRenderer()->makeLink(
+ $this->target,
+ null,
+ [],
+ $this->target->isRedirect() ? [ 'redirect' => 'no' ] : []
+ );
- $msg = $this->msg( 'linkshere' )
- ->params( $this->target->getPrefixedText() )
- ->rawParams( $link )
- ->parseAsBlock();
- $out->addHTML( $msg );
+ $msg = $this->msg( 'linkshere' )
+ ->params( $this->target->getPrefixedText() )
+ ->rawParams( $link )
+ ->parseAsBlock();
+ $out->addHTML( $msg );
- $prevnext = $this->getPrevNext( $prevId, $nextId );
- $out->addHTML( $prevnext );
- }
+ $prevnext = $this->getPrevNext( $prevId, $nextId );
+ $out->addHTML( $prevnext );
}
$out->addHTML( $this->listStart( $level ) );
foreach ( $rows as $row ) {
$out->addHTML( $this->listEnd() );
- if ( $level == 0 ) {
- if ( !$this->including() ) {
- $out->addHTML( $prevnext );
- }
+ if ( $level == 0 && !$this->including() ) {
+ $out->addHTML( $prevnext );
}
}