if (category.isInTrash()) {
continue;
}
int oldStatus = category.getStatus();
category.setStatus(WorkflowConstants.STATUS_IN_TRASH);
<BUG>mbCategoryPersistence.update(category);
trashVersionLocalService.addTrashVersion(</BUG>
trashEntryId, MBCategory.class.getName(),
<BUG>category.getCategoryId(), oldStatus);
moveDependentsToTrash(</BUG>
user,

if (category.isInTrash()) {
continue;
}
int oldStatus = category.getStatus();
category.setStatus(WorkflowConstants.STATUS_IN_TRASH);
mbCategoryPersistence.update(category);
if (oldStatus != WorkflowConstants.STATUS_APPROVED) {
trashVersionLocalService.addTrashVersion(
trashEntryId, MBCategory.class.getName(),
category.getCategoryId(), oldStatus);
}
moveDependentsToTrash(
user,
