From 15e09e8eb8e20df182b980622435de8ad74ca994 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Mon, 28 Aug 2006 19:42:16 +0000 Subject: [PATCH] * changed query to limit the source pages to the main namespace. --- includes/SpecialDisambiguations.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/includes/SpecialDisambiguations.php b/includes/SpecialDisambiguations.php index 90a112102f..f6067820a4 100644 --- a/includes/SpecialDisambiguations.php +++ b/includes/SpecialDisambiguations.php @@ -70,13 +70,15 @@ class DisambiguationsPage extends PageQueryPage { wfDebug("Mediawiki:disambiguationspage message does not link to any templates!\n"); } - $sql = "SELECT 'Disambiguations' AS \"type\", pa.page_namespace AS namespace," - ." pa.page_title AS title, la.pl_from AS value" - ." FROM {$templatelinks} AS lb, {$page} AS pa, {$pagelinks} AS la" - ." WHERE " . $set # disambiguation template(s) - .' AND pa.page_id = lb.tl_from' - .' AND pa.page_namespace = la.pl_namespace' - .' AND pa.page_title = la.pl_title'; + $sql = "SELECT 'Disambiguations' AS \"type\", pb.page_namespace AS namespace," + ." pb.page_title AS title, la.pl_from AS value" + ." FROM {$templatelinks} AS lb, {$page} AS pb, {$pagelinks} AS la, {$page} AS pa" + ." WHERE $set" # disambiguation template(s) + .' AND pa.page_id = la.pl_from' + .' AND pa.page_namespace = ' . NS_MAIN # Limit to just articles in the main namespace + .' AND pb.page_id = lb.tl_from' + .' AND pb.page_namespace = la.pl_namespace' + .' AND pb.page_title = la.pl_title'; return $sql; } -- 2.20.1