From: Aaron Schulz Date: Wed, 28 Mar 2018 21:36:18 +0000 (-0700) Subject: Make SpecialWhatLinkshere::showIndirectLinks use buildSelectSubquery() X-Git-Tag: 1.31.0-rc.0~251^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=cc9a66e91bbc44ab5b2d0159a467c9ac77a87bc1 Make SpecialWhatLinkshere::showIndirectLinks use buildSelectSubquery() This avoids the SPI log warning from d395dfb039 Change-Id: I193418a224a8c6c0cc919e29c66686947d5969bf --- diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index 6f91c46f86..3080fbfedb 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -162,7 +162,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage { ]; $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], @@ -175,7 +175,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage { ] ); 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',