Don't include empty categories in Special:Mostlinkedcategories
authorBrian Wolff <bawolff+wn@gmail.com>
Thu, 26 Dec 2013 22:47:01 +0000 (15:47 -0700)
committerReedy <reedy@wikimedia.org>
Tue, 28 Jan 2014 02:25:15 +0000 (02:25 +0000)
We never delete things from the category table, so there are
entries in it with 0 members, which really shouldn't show up
on the special page.

Bug: 58967
Change-Id: I6bdf5a5196724f7970fb79497ef912cf8268ec3e

includes/specials/SpecialMostlinkedcategories.php

index 0d4641b..f61a115 100644 (file)
@@ -44,6 +44,7 @@ class MostlinkedCategoriesPage extends QueryPage {
                        'fields' => array( 'title' => 'cat_title',
                                'namespace' => NS_CATEGORY,
                                'value' => 'cat_pages' ),
+                       'conds' => array( 'cat_pages > 0' ),
                );
        }