public function deleteCategory($ctype_name, $id, $is_delete_content = false) { $category = $this->getCategory($ctype_name, $id); $this->filterCategory($ctype_name, $category, true); if (!$is_delete_content) { $table_name = $this->table_prefix . $ctype_name; $this->updateFiltered($table_name, array('category_id' => 1)); } if ($is_delete_content) { $items = $this->getContentItems($ctype_name); if ($items) { foreach ($items as $item) { $this->deleteContentItem($ctype_name, $item['id']); } } } $this->unbindContentProps($ctype_name, $id); parent::deleteCategory($ctype_name, $id); }