Index: branches/5.0.x/core/units/general/cat_event_handler.php =================================================================== diff -u -r12277 -r12280 --- branches/5.0.x/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 12277) +++ branches/5.0.x/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 12280) @@ -1,6 +1,6 @@ Application->findModule('Name', 'Core', 'RootCat'); } - if ((string) $parent_cat_id != 'any') { + if ((string)$parent_cat_id != 'any') { if ($event->getEventParam('recursive')) { $filter_clause = $this->getCategoryLimitClause($parent_cat_id); if ($filter_clause !== false) { @@ -586,6 +586,9 @@ $object->addFilter('category_filter', TABLE_PREFIX.'CategoryItems.CategoryId = '.$parent_cat_id ); } } + else { + $object->addFilter('primary_filter', 'PrimaryCat = 1'); + } } else { $object->addFilter('primary_filter', 'PrimaryCat = 1');