Index: trunk/core/units/general/helpers/recursive_helper.php =================================================================== diff -u -N -r5177 -r5178 --- trunk/core/units/general/helpers/recursive_helper.php (.../recursive_helper.php) (revision 5177) +++ trunk/core/units/general/helpers/recursive_helper.php (.../recursive_helper.php) (revision 5178) @@ -17,20 +17,20 @@ $this->DeleteCategory($sub_category_id); } } - else { - // 1. remove category items from this category if it is supplemental (non-primary) category to them - $sql = 'DELETE FROM '.TABLE_PREFIX.'CategoryItems - WHERE ('.$id_field.' = '.$category_id.') AND (PrimaryCat = 0)'; - $this->Conn->Query($sql); - - $temp_handler =& $this->Application->recallObject('c_TempHandler', 'kTempTablesHandler'); - - // 2. delete items this have this category as primary -// $temp_handler->DeleteItems($item_prefix, '', $item_ids); - - // 3. delete this category - $temp_handler->DeleteItems('c', '', Array($category_id)); - } + + // 1. remove category items from this category if it is supplemental (non-primary) category to them + $sql = 'DELETE FROM '.TABLE_PREFIX.'CategoryItems + WHERE ('.$id_field.' = '.$category_id.') AND (PrimaryCat = 0)'; + $this->Conn->Query($sql); + + $temp_handler =& $this->Application->recallObject('c_TempHandler', 'kTempTablesHandler'); + + // 2. delete items this have this category as primary +// $temp_handler->DeleteItems($item_prefix, '', $item_ids); + + // 3. delete this category + $temp_handler->DeleteItems('c', '', Array($category_id)); + } }