From: umherirrender Date: Fri, 13 Jul 2012 14:54:15 +0000 (+0200) Subject: Do not show empty categories with list=allcategories X-Git-Tag: 1.31.0-rc.0~23054^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=4b9bd6a4dba57026b2f18d4024b021407e52ff4f;p=lhc%2Fweb%2Fwiklou.git Do not show empty categories with list=allcategories Special:Categories is also not showing empty categories. Change-Id: If23a763c887ed827ed548ff2af6abea04e46dbb9 --- 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'] ) );