Merge "Update phpCharToUpper.json based on current differences"
[lhc/web/wiklou.git] / includes / specials / SpecialUnusedcategories.php
index 1469742..2577a10 100644 (file)
@@ -39,7 +39,7 @@ class UnusedCategoriesPage extends QueryPage {
 
        public function getQueryInfo() {
                return [
-                       'tables' => [ 'page', 'categorylinks' ],
+                       'tables' => [ 'page', 'categorylinks', 'page_props' ],
                        'fields' => [
                                'namespace' => 'page_namespace',
                                'title' => 'page_title',
@@ -48,9 +48,16 @@ class UnusedCategoriesPage extends QueryPage {
                        'conds' => [
                                'cl_from IS NULL',
                                'page_namespace' => NS_CATEGORY,
-                               'page_is_redirect' => 0
+                               'page_is_redirect' => 0,
+                               'pp_page IS NULL'
                        ],
-                       'join_conds' => [ 'categorylinks' => [ 'LEFT JOIN', 'cl_to = page_title' ] ]
+                       'join_conds' => [
+                               'categorylinks' => [ 'LEFT JOIN', 'cl_to = page_title' ],
+                               'page_props' => [ 'LEFT JOIN', [
+                                       'page_id = pp_page',
+                                       'pp_propname' => 'expectunusedcategory'
+                               ] ]
+                       ]
                ];
        }