/** * Удаление категории. * * @param integer $category_id Идентификатор категории * @param integer $commune_id Идентификатор сообщества * @param integer $om ID вкладки */ function DeleteCategory($category_id, $commune_id, $om) { global $session; session_start(); $objResponse = new xajaxResponse(); $uid = get_uid(false); if ($uid) { $status = commune::GetUserCommuneRel($commune_id, $uid); } if ($status['is_moderator'] == 1 || $status['is_admin'] == 1 || $status['is_author'] == 1 || hasPermissions('communes')) { commune::deleteCategory($category_id, $commune_id); $objResponse->script("window.location = '/commune/?id={$commune_id}&om={$om}';"); } return $objResponse; }