From 4b9bd6a4dba57026b2f18d4024b021407e52ff4f Mon Sep 17 00:00:00 2001 From: umherirrender Date: Fri, 13 Jul 2012 16:54:15 +0200 Subject: [PATCH] Do not show empty categories with list=allcategories Special:Categories is also not showing empty categories. Change-Id: If23a763c887ed827ed548ff2af6abea04e46dbb9 --- includes/api/ApiQueryAllCategories.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/api/ApiQueryAllCategories.php b/includes/api/ApiQueryAllCategories.php index 60b57bfc3a..a2fb5c364e 100644 --- a/includes/api/ApiQueryAllCategories.php +++ b/includes/api/ApiQueryAllCategories.php @@ -57,6 +57,7 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase { $this->addTables( 'category' ); $this->addFields( 'cat_title' ); + $this->addWhere( 'cat_pages > 0' ); $dir = ( $params['dir'] == 'descending' ? 'older' : 'newer' ); $from = ( is_null( $params['from'] ) ? null : $this->titlePartToKey( $params['from'] ) ); -- 2.20.1