From: Aryeh Gregor Date: Sun, 25 Jan 2009 15:23:56 +0000 (+0000) Subject: Fix last commit, was broken X-Git-Tag: 1.31.0-rc.0~43251 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=0d88a7e1a9128d77b5706efd04556289821e22af;p=lhc%2Fweb%2Fwiklou.git 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. --- 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 ) {