When I want to query for all categories that have at least one member, I can use a query like
But if I want to them in the reverse order:
the result is wrong. It contains categories with *at most* one member, that's the opposite of what I want.
I think the problem is this line in ApiQueryAllCategories.php:
$this->addWhereRange( 'cat_pages', $dir, $min, $max );
I think this range shouldn't depend on $dir. Changing it to
$this->addWhereRange( 'cat_pages', 'newer', $min, $max );
works fine for me, but I'm not completely sure this is the right solution.