} else { $arResult["PostPerm"] = strlen($arParams["POST_DATA"]["perms"]) <= 0 ? CBlogPost::GetSocNetPostPerms($arParams["ID"]) : $arParams["POST_DATA"]["perms"]; if ($arResult["PostPerm"] > BLOG_PERMS_DENY) { if ($bIntranetInstalled && IsModuleInstalled("bitrix24") && $arParams["POST_DATA"]["HAVE_ALL_IN_ADR"] == "Y") { if ($arPost["AUTHOR_ID"] != $user_id) { $arResult["Perm"] = BLOG_PERMS_WRITE; } else { $arResult["Perm"] = BLOG_PERMS_FULL; } } else { $arResult["Perm"] = CBlogComment::GetSocNetUserPerms($arParams["ID"], $arPost["AUTHOR_ID"]); } } } if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_REQUEST['mfi_mode']) && $_REQUEST['mfi_mode'] == "upload") { CBlogImage::AddImageResizeHandler(array("width" => 400, "height" => 400)); } if (!empty($arPost) && $arPost["PUBLISH_STATUS"] == BLOG_PUBLISH_STATUS_PUBLISH && $arPost["ENABLE_COMMENTS"] == "Y") { //Comment delete if (IntVal($_GET["delete_comment_id"]) > 0) { if ($_GET["success"] == "Y") { $arResult["MESSAGE"] = GetMessage("B_B_PC_MES_DELED"); } else { $arComment = CBlogComment::GetByID(IntVal($_GET["delete_comment_id"])); if (($arResult["Perm"] >= BLOG_PERMS_MODERATE || IntVal($user_id) > 0 && $arComment["AUTHOR_ID"] == $user_id) && !empty($arComment)) { if (check_bitrix_sessid()) { if (CBlogComment::Delete(IntVal($_GET["delete_comment_id"]))) { BXClearCache(true, "/blog/comment/" . intval($arParams["ID"] / 100) . "/" . $arParams["ID"] . "/"); CBlogComment::DeleteLog(IntVal($_GET["delete_comment_id"])); $arResult["ajax_comment"] = IntVal($_GET["delete_comment_id"]); $arResult["MESSAGE"] = GetMessage("B_B_PC_MES_DELED");