Per code review by P. Copp:
<http://www.mediawiki.org/wiki/Special:Code/MediaWiki/46196/reply/1407#c1407>
The conditions on the join would only work if the category had no other
page_props. Otherwise it would return incorrect results.
{$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 ) {