Skip to content

Commit

Permalink
Remove unnecessary comment
Browse files Browse the repository at this point in the history
All queries use $table
  • Loading branch information
BrandonXLF committed Nov 25, 2023
1 parent dc35de1 commit da8aa21
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions includes/LinkCount.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ private function counts($table, $prefix, $mode = self::COUNT_MODE_LINK, $singleN
$fromNamespaceJoin = '';

if ($this->fromNamespaces !== '') {
// Must be used in queries with $table
$fromNamespaceWhere = $hasFromNamespace ? " AND {$prefix}_from_namespace IN ({$this->fromNamespaces})" : '';
$fromNamespaceJoin = !$hasFromNamespace ? " JOIN page AS source ON source.page_id = {$prefix}_from AND source.page_namespace IN ({$this->fromNamespaces})" : '';
}
Expand All @@ -122,7 +121,6 @@ private function counts($table, $prefix, $mode = self::COUNT_MODE_LINK, $singleN
WHERE rd_title = $escapedTitle AND rd_namespace = {$this->title->getNamespaceId()} AND (rd_interwiki IS NULL OR rd_interwiki = $escapedBlank)
SQL;
} else {
// Must be used in queries with $table
$directCond = <<<SQL
JOIN linktarget on {$prefix}_target_id = lt_id $fromNamespaceJoin
WHERE lt_title = $escapedTitle AND lt_namespace = {$this->title->getNamespaceId()} $fromNamespaceWhere
Expand Down

0 comments on commit da8aa21

Please sign in to comment.