From 0d88a7e1a9128d77b5706efd04556289821e22af Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 25 Jan 2009 15:23:56 +0000 Subject: [PATCH] Fix last commit, was broken Per code review by P. Copp: The conditions on the join would only work if the category had no other page_props. Otherwise it would return incorrect results. --- includes/specials/SpecialUnusedcategories.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/specials/SpecialUnusedcategories.php b/includes/specials/SpecialUnusedcategories.php index ced32d92e4..8ed407879b 100644 --- a/includes/specials/SpecialUnusedcategories.php +++ b/includes/specials/SpecialUnusedcategories.php @@ -27,11 +27,11 @@ class UnusedCategoriesPage extends QueryPage { {$NScat} as namespace, page_title as title, page_title as value FROM $page LEFT JOIN $categorylinks ON page_title=cl_to - LEFT JOIN $page_props ON pp_page=page_id + LEFT JOIN $page_props ON (pp_page=page_id AND pp_propname = 'ignoreunused') WHERE cl_from IS NULL AND page_namespace = {$NScat} AND page_is_redirect = 0 - AND (pp_propname IS NULL OR pp_propname != 'ignoreunused')"; + AND pp_propname IS NULL"; } function formatResult( $skin, $result ) { -- 2.20.1