joomla/joomla-cms — pull request #3175 by radiant-tech (2014-02-24 15:10:14+00:00)
Title: var childrennumitems in JCategoryNode is never set

When the option 'countItems' is passed to the JCategories load function, the var 'numitems' is created for JCategoryNode; however, 'childrennumitems' is never set.

The patch sets the value of 'childrennumitems' at the end of the load function, after all the nodes have been created.

Having this value available is helpful in cases such as Tracker #33002 -- where the "Subcategories" text is displayed even if user chooses to hide empty subcategories and none of the subcategories have items.

Patch also includes suggested changes to the content category layout file and to com_content blog category view to help with testing.