本文整理汇总了PHP中CSocNetLogComments::GetList方法的典型用法代码示例。如果您正苦于以下问题:PHP CSocNetLogComments::GetList方法的具体用法?PHP CSocNetLogComments::GetList怎么用?PHP CSocNetLogComments::GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSocNetLogComments
的用法示例。
在下文中一共展示了CSocNetLogComments::GetList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RemoveComment
private function RemoveComment($CommentId = false)
{
$arNotification = $this->Notify->getNotification();
$oLogComment = CSocNetLogComments::GetList(
array("ID" => "DESC"),
array(
"SOURCE_ID" => $CommentId?$CommentId:$arNotification["ID"],
"EVENT_ID" => 'idea_comment',
),
false,
false,
array("ID")
);
while($arLogComment = $oLogComment->Fetch())
CSocNetLogComments::Delete($arLogComment["ID"]);
}
示例2: __deprecated_Add
/**
* WARNING! This method is transitional and can be changed without
* any notifications! Don't use it.
*
* @deprecated
*/
public static function __deprecated_Add($commentText, $forumTopicId, $forumId, $nameTemplate, $arTask, $permissions, $commentId, $givenUserId, $imageWidth, $imageHeight, $arSmiles, $arForum, $messagesPerPage, $arUserGroupArray, $backPage, $strMsgAddComment, $strMsgEditComment, $strMsgNewTask, $componentName, &$outForumTopicId, &$arErrorCodes, &$outStrUrl, $arFieldsAdditional)
{
global $DB;
if (is_array($arTask)) {
if (!array_key_exists('~TITLE', $arTask)) {
$arTmpTask = $arTask;
foreach ($arTmpTask as $key => $value) {
if (substr($key, 0, 1) !== '~') {
$arTask['~' . $key] = $arTmpTask[$key];
}
}
}
}
$MID = 0;
$TID = 0;
if ($forumTopicId > 0 && CForumTopic::GetByID($forumTopicId) === false) {
$forumTopicId = false;
}
if ($forumTopicId <= 0) {
$arUserStart = array("ID" => intVal($arTask["CREATED_BY"]), "NAME" => $GLOBALS["FORUM_STATUS_NAME"]["guest"]);
if ($arUserStart["ID"] > 0) {
$res = array();
$db_res = CForumUser::GetListEx(array(), array("USER_ID" => $arTask["CREATED_BY"]));
if ($db_res && ($res = $db_res->Fetch())) {
$res["FORUM_USER_ID"] = intVal($res["ID"]);
$res["ID"] = $res["USER_ID"];
} else {
$db_res = CUser::GetByID($arTask["CREATED_BY"]);
if ($db_res && ($res = $db_res->Fetch())) {
$res["SHOW_NAME"] = COption::GetOptionString("forum", "USER_SHOW_NAME", "Y");
$res["USER_PROFILE"] = "N";
}
}
if (!empty($res)) {
$arUserStart = $res;
$sName = $res["SHOW_NAME"] == "Y" ? trim(CUser::FormatName($nameTemplate, $res)) : "";
$arUserStart["NAME"] = empty($sName) ? trim($res["LOGIN"]) : $sName;
}
}
$arUserStart["NAME"] = empty($arUserStart["NAME"]) ? $GLOBALS["FORUM_STATUS_NAME"]["guest"] : $arUserStart["NAME"];
$DB->StartTransaction();
$arFields = array("TITLE" => $arTask["~TITLE"], "FORUM_ID" => $forumId, "USER_START_ID" => $arUserStart["ID"], "USER_START_NAME" => $arUserStart["NAME"], "LAST_POSTER_NAME" => $arUserStart["NAME"], "APPROVED" => "Y", "PERMISSION_EXTERNAL" => $permissions, "PERMISSION" => $permissions, "NAME_TEMPLATE" => $nameTemplate, 'XML_ID' => 'TASK_' . $arTask['ID']);
$TID = CForumTopic::Add($arFields);
if (intVal($TID) <= 0) {
$arErrorCodes[] = array('code' => 'topic is not created');
} else {
$arFields = array("FORUM_TOPIC_ID" => $TID);
$task = new CTasks();
$task->Update($arTask["ID"], $arFields);
}
if (!empty($arErrorCodes)) {
$DB->Rollback();
return false;
} else {
$DB->Commit();
}
}
$arFieldsG = array("POST_MESSAGE" => $commentText, "AUTHOR_NAME" => '', "AUTHOR_EMAIL" => $GLOBALS['USER']->GetEmail(), "USE_SMILES" => NULL, "PARAM2" => $arTask['ID'], "TITLE" => $arTask["~TITLE"], "PERMISSION_EXTERNAL" => $permissions, "PERMISSION" => $permissions);
// UF_* forwarding
if (is_array($arFieldsAdditional)) {
foreach ($arFieldsAdditional as $field => $value) {
if (strlen($field) && substr($field, 0, 3) == 'UF_') {
$arFieldsG[$field] = $value;
$GLOBALS[$field] = $value;
// strange behaviour required for ForumMessageAdd() to handle UF_* properly
}
}
}
if (!empty($_FILES["REVIEW_ATTACH_IMG"])) {
$arFieldsG["ATTACH_IMG"] = $_FILES["REVIEW_ATTACH_IMG"];
} else {
$arFiles = array();
if (!empty($_REQUEST["FILES"])) {
foreach ($_REQUEST["FILES"] as $key) {
$arFiles[$key] = array("FILE_ID" => $key);
if (!in_array($key, $_REQUEST["FILES_TO_UPLOAD"])) {
$arFiles[$key]["del"] = "Y";
}
}
}
if (!empty($_FILES)) {
$res = array();
foreach ($_FILES as $key => $val) {
if (substr($key, 0, strLen("FILE_NEW")) == "FILE_NEW" && !empty($val["name"])) {
$arFiles[] = $_FILES[$key];
}
}
}
if (!empty($arFiles)) {
$arFieldsG["FILES"] = $arFiles;
}
}
$TOPIC_ID = $forumTopicId > 0 ? $forumTopicId : $TID;
$MESSAGE_ID = 0;
//.........这里部分代码省略.........
示例3: OnAfterPhotoCommentDeleteBlog
public function OnAfterPhotoCommentDeleteBlog($ID)
{
if (!$this->IsSocnet) {
return;
}
if (intval($ID) > 0) {
$dbRes = CSocNetLogComments::GetList(array("ID" => "DESC"), array("EVENT_ID" => "photo_comment", "SOURCE_ID" => $ID), false, false, array("ID", "LOG_ID"));
if ($arRes = $dbRes->Fetch()) {
$res = CSocNetLogComments::Delete($arRes["ID"]);
if ($res) {
$dbResult = CSocNetLog::GetList(array(), array("ID" => $arRes["LOG_ID"]), false, false, array("ID", "COMMENTS_COUNT"));
if ($arLog = $dbResult->Fetch()) {
if ($arLog["COMMENTS_COUNT"] == 0) {
CSocNetLog::Delete($arRes["LOG_ID"]);
}
}
}
}
}
}
示例4: UpdateLogData
function UpdateLogData($log_id, $bSetDate = true, $bSetDateByLastComment = false)
{
$dbResult = CSocNetLogComments::GetList(array(), array("LOG_ID" => $log_id), array());
$comments_count = $dbResult;
$dbResult = CSocNetLog::GetList(array(), array("ID" => $log_id), false, false, array("ID", "COMMENTS_COUNT", "LOG_DATE"));
while ($arResult = $dbResult->Fetch()) {
$arFields = array("COMMENTS_COUNT" => $comments_count);
if ($bSetDateByLastComment) {
$dbComment = CSocNetLogComments::GetList(array("LOG_DATE" => "DESC"), array("LOG_ID" => $log_id), false, false, array("ID", "LOG_DATE"));
if ($arComment = $dbComment->Fetch()) {
$arFields["LOG_UPDATE"] = $arComment["LOG_DATE"];
} else {
$arFields["LOG_UPDATE"] = $arResult["LOG_DATE"];
}
} elseif ($bSetDate) {
$arFields["=LOG_UPDATE"] = $GLOBALS["DB"]->CurrentTimeFunction();
}
CSocNetLog::Update($arResult["ID"], $arFields);
CSocNetLogFollow::DeleteByLogID($log_id, "Y", true);
}
}
示例5: _getSocnetLogCommentByForumComment
private function _getSocnetLogCommentByForumComment($forumPostID, $arSocnetLogEntity)
{
$commentID = false;
$arFilter = array("ENTITY_TYPE" => $arSocnetLogEntity["ENTITY_TYPE"], "ENTITY_ID" => $arSocnetLogEntity["ENTITY_ID"], "EVENT_ID" => $this->event_comments_id, "SOURCE_ID" => $forumPostID);
$arListParams = array("USE_SUBSCRIBE" => "N");
$dbComments = CSocNetLogComments::GetList(array(), $arFilter, false, false, array(), $arListParams);
if ($arComments = $dbComments->GetNext()) {
$commentID = $arComments['ID'];
}
return $commentID;
}
示例6: Update
function Update($ID, $arFields, $bSetSource = false)
{
global $DB;
$ID = IntVal($ID);
if ($ID <= 0)
{
$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SONET_LC_WRONG_PARAMETER_ID"), "ERROR_NO_ID");
return false;
}
if ($bSetSource)
{
if (strlen($arFields["EVENT_ID"]) > 0)
{
$arCommentEvent = CSocNetLogTools::FindLogCommentEventByID($arFields["EVENT_ID"]);
if (
!$arCommentEvent
|| !array_key_exists("UPDATE_CALLBACK", $arCommentEvent)
|| !is_callable($arCommentEvent["UPDATE_CALLBACK"])
)
{
$bSetSource = false;
}
}
if (
!isset($arFields["SOURCE_ID"])
|| !isset($arFields["LOG_ID"])
)
{
$rsRes = CSocNetLogComments::GetList(
array(),
array("ID" => $ID),
false,
false,
array("LOG_ID", "SOURCE_ID")
);
if ($arRes = $rsRes->Fetch())
{
$arFields["SOURCE_ID"] = $arRes["SOURCE_ID"];
$arFields["LOG_ID"] = $arRes["LOG_ID"];
}
}
if (!isset($arFields["SOURCE_ID"]))
{
$bSetSource = false;
}
}
$arFields1 = array();
foreach ($arFields as $key => $value)
{
if (substr($key, 0, 1) == "=")
{
$arFields1[substr($key, 1)] = $value;
unset($arFields[$key]);
}
}
if ($bSetSource)
{
$arSource = CSocNetLogComments::SetSource($arFields, "UPDATE");
if (
isset($arSource["NO_SOURCE"])
&& $arSource["NO_SOURCE"] == "Y"
)
{
$bSetSource = false;
}
elseif (
is_array($arSource)
&& (
isset($arSource["ERROR"])
&& !empty($arSource["ERROR"])
)
)
{
return array(
"ID" => false,
"MESSAGE" => $arSource["ERROR"]
);
}
else
{
if (
isset($arSource["MESSAGE"])
&& strlen($arSource["MESSAGE"]) > 0
)
{
$arFields["MESSAGE"] = $arSource["MESSAGE"];
}
if (
isset($arSource["TEXT_MESSAGE"])
&& strlen($arSource["TEXT_MESSAGE"]) > 0
)
{
//.........这里部分代码省略.........
示例7: array
}
$logID = CSocNetLog::Add($arSonetFields, false);
if (intval($logID) > 0) {
CSocNetLog::Update($logID, array("TMP_ID" => $logID));
CSocNetLogRights::SetForSonet($logID, $arSonetFields["ENTITY_TYPE"], $arSonetFields["ENTITY_ID"], "forum", "view", true);
CSocNetLog::SendEvent($logID, "SONET_NEW_EVENT", $logID);
}
} elseif ($arParams["MESSAGE_TYPE"] == "EDIT") {
$dbRes = CSocNetLog::GetList(array(), array("EVENT_ID" => "forum", "SOURCE_ID" => $MID1), false, false, array("ID"));
if ($arRes = $dbRes->Fetch()) {
// topic
$arSonetFields = array_intersect_key($arSonetFields, array_flip(array("TITLE_TEMPLATE", "TITLE", "MESSAGE", "TEXT_MESSAGE", "PARAMS")));
CSocNetLog::Update($arRes["ID"], $arSonetFields);
CSocNetLogRights::SetForSonet($arRes["ID"], $arParams["MODE"] == "GROUP" ? SONET_ENTITY_GROUP : SONET_ENTITY_USER, $arParams["MODE"] == "GROUP" ? $arParams["SOCNET_GROUP_ID"] : $arParams["USER_ID"], "forum", "view");
} else {
$dbRes = CSocNetLogComments::GetList(array(), array("EVENT_ID" => "forum", "SOURCE_ID" => $MID1), false, false, array("ID"));
if ($arRes = $dbRes->Fetch()) {
// message/comment
$arSonetFields = array_intersect_key($arSonetFields, array_flip(array("MESSAGE", "TEXT_MESSAGE", "PARAMS")));
CSocNetLogComments::Update($arRes["ID"], $arSonetFields);
}
}
}
$url = ForumAddPageParams(CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_MESSAGE"], array("FID" => $arParams["FID"], "TID" => $arParams["TID"], "MID" => intVal($arParams["MID"]), "UID" => $arParams["USER_ID"], "GID" => $arParams["SOCNET_GROUP_ID"])), array("result" => $arNote["code"]));
LocalRedirect($url);
} elseif (intVal($arFieldsG["PARAM2"]) > 0 && $arFieldsG["PARAM1"] == "VT") {
CVote::Delete($arFieldsG["PARAM2"]);
}
}
if (!empty($strErrorMessage)) {
$arError[] = array("id" => $arParams["MESSAGE_TYPE"], "text" => $strErrorMessage);
示例8: array
<?php
if (CModule::IncludeModule("blog")) {
$arComments = array();
$dbLogComment = CSocNetLogComments::GetList(array("LOG_DATE" => "ASC"), array("EVENT_ID" => "blog_comment_micro", "SOURCE_ID" => false), false, false, array("ID", "LOG_SOURCE_ID", "USER_ID", "TEXT_MESSAGE", "LOG_DATE"));
while ($arLogComment = $dbLogComment->Fetch()) {
$arPost = CBlogPost::GetByID($arLogComment["LOG_SOURCE_ID"]);
if ($arPost) {
$arBlog = CBlog::GetByID($arPost["BLOG_ID"]);
$arFieldsComment = array("POST_ID" => $arPost["ID"], "BLOG_ID" => $arBlog["ID"], "POST_TEXT" => $arLogComment["TEXT_MESSAGE"], "DATE_CREATE" => $arLogComment["LOG_DATE"], "AUTHOR_ID" => $arLogComment["USER_ID"], "PARENT_ID" => false);
$commentId = CBlogComment::Add($arFieldsComment);
$arComments[$arLogComment["ID"]] = $commentId;
}
}
foreach ($arComments as $log_comment_id => $blog_comment_id) {
CSocNetLogComments::Update($log_comment_id, array("SOURCE_ID" => $blog_comment_id));
}
}
示例9: GetMessage
}
} else {
$arResult["ERROR_MESSAGE"] = GetMessage("B_B_PC_MES_ERROR_SESSION");
}
}
$arResult["ERROR_MESSAGE"] = GetMessage("B_B_PC_MES_ERROR_DELETE");
}
} elseif (IntVal($_GET["show_comment_id"]) > 0) {
$arComment = CBlogComment::GetByID(IntVal($_GET["show_comment_id"]));
if ($arResult["Perm"] >= BLOG_PERMS_MODERATE && !empty($arComment)) {
if ($arComment["PUBLISH_STATUS"] != BLOG_PUBLISH_STATUS_READY) {
$arResult["ERROR_MESSAGE"] = GetMessage("B_B_PC_MES_ERROR_SHOW");
} else {
if (check_bitrix_sessid()) {
if ($commentID = CBlogComment::Update($arComment["ID"], array("PUBLISH_STATUS" => BLOG_PUBLISH_STATUS_PUBLISH))) {
$dbLogComment = CSocNetLogComments::GetList(array("ID" => "DESC"), array("EVENT_ID" => array("idea_comment"), "SOURCE_ID" => $commentID), false, false, array("ID"));
$arLogComment = $dbLogComment->Fetch();
if (!$arLogComment) {
$Notify = CIdeaManagment::getInstance()->Notification(array("TYPE" => 'IDEA_COMMENT', "ACTION" => 'ADD', "ID" => $commentID, "POST_ID" => $arPost["ID"], "AUTHOR_ID" => $arComment["AUTHOR_ID"], "PATH" => $arComment["PATH"], "POST_TEXT" => $arComment["POST_TEXT"], "LOG_DATE" => $arComment["DATE_CREATE"]))->getSonetNotify()->Send();
}
BXClearCache(True, "/" . SITE_ID . "/idea/" . $arBlog["ID"] . "/first_page/");
BXClearCache(True, "/" . SITE_ID . "/idea/" . $arBlog["ID"] . "/comment/" . $arComment["POST_ID"] . "/");
BXClearCache(True, "/" . SITE_ID . "/idea/" . $arBlog["ID"] . "/post/" . $arComment["POST_ID"] . "/");
LocalRedirect($APPLICATION->GetCurPageParam("", $arRemoveUriParams));
}
} else {
$arResult["ERROR_MESSAGE"] = GetMessage("B_B_PC_MES_ERROR_SESSION");
}
}
}
$arResult["ERROR_MESSAGE"] = GetMessage("B_B_PC_MES_ERROR_SHOW");
示例10: GetDataFromRatingEntity
function GetDataFromRatingEntity($rating_entity_type_id, $rating_entity_id, $bCheckRights = true)
{
$rating_entity_type_id = preg_replace("/[^a-z0-9_-]/i", "", $rating_entity_type_id);
$rating_entity_id = intval($rating_entity_id);
if (strlen($rating_entity_type_id) <= 0)
return false;
if ($rating_entity_id <= 0)
return false;
switch ($rating_entity_type_id)
{
case "BLOG_POST":
$log_type = "log";
$log_event_id = array("blog_post", "blog_post_important");
break;
case "BLOG_COMMENT":
$log_type = "comment";
$log_event_id = array("blog_comment", "photo_comment");
break;
case "FORUM_TOPIC":
$log_type = "log";
$log_event_id = array("forum");
if (CModule::IncludeModule("forum"))
{
$dbForumMessage = CForumMessage::GetList(
array("ID" => "ASC"),
array("TOPIC_ID" => $rating_entity_id),
false,
1
);
if ($arForumMessage = $dbForumMessage->Fetch())
{
$rating_entity_id = $arForumMessage["ID"];
}
}
break;
case "FORUM_POST":
$log_type = "comment";
$log_event_id = array("forum", "photo_comment", "files_comment", "commondocs_comment", "tasks_comment", "wiki_comment");
break;
case "IBLOCK_ELEMENT":
$log_type = "log";
$log_event_id = array("photo_photo", "files", "commondocs", "wiki");
break;
case "INTRANET_NEW_USER":
$log_type = "log";
$log_event_id = array("intranet_new_user");
break;
case "INTRANET_NEW_USER_COMMENT":
$log_type = "comment";
$log_event_id = array("intranet_new_user_comment");
break;
case "BITRIX24_NEW_USER":
$log_type = "log";
$log_event_id = array("bitrix24_new_user");
break;
case "BITRIX24_NEW_USER_COMMENT":
$log_type = "comment";
$log_event_id = array("bitrix24_new_user_comment");
break;
case "VOTING":
$log_type = "log";
$log_event_id = array("blog_post", "blog_post_important");
if (CModule::IncludeModule("blog"))
{
$rsBlogPost = CBlogPost::GetList(
array("ID" => "DESC"),
array("UF_BLOG_POST_VOTE" => $rating_entity_id),
false,
array("nTopCount" => 1),
array("ID")
);
if ($arBlogPost = $rsBlogPost->Fetch())
{
$rating_entity_id = $arBlogPost["ID"];
}
}
break;
case "LOG_ENTRY":
$log_type = "log_entry";
break;
case "LOG_COMMENT":
$log_type = "log_comment";
break;
default:
}
if ($log_type == "log")
{
$rsLogSrc = CSocNetLog::GetList(
array(),
array(
"EVENT_ID" => $log_event_id,
"SOURCE_ID" => $rating_entity_id
),
false,
false,
//.........这里部分代码省略.........
示例11: onAfterMessageDelete
function onAfterMessageDelete($ID, $arFields)
{
if ((!array_key_exists('PARAM1', $arFields) || $arFields['PARAM1'] != 'IB') && array_key_exists('PARAM2', $arFields) && intval($arFields['PARAM2']) > 0) {
$dbRes = CSocNetLogComments::GetList(array("ID" => "DESC"), array("EVENT_ID" => "wiki_comment", "SOURCE_ID" => $ID), false, false, array("ID"));
while ($arRes = $dbRes->Fetch()) {
CSocNetLogComments::Delete($arRes["ID"]);
}
}
}
示例12: array
$arFields = array("TID" => $arParams["TID"]);
$url = CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_TOPIC_LIST"], array("FID" => $arParams["FID"]));
break;
}
$strErrorMessage = "";
$strOKMessage = "";
$res = false;
$arFields["PERMISSION_EXTERNAL"] = $arParams["PERMISSION"];
$arFields["PERMISSION"] = $arParams["PERMISSION"];
$arLogID_Del = array();
$arLogCommentID_Del = array();
switch ($action) {
case "DEL":
case "HIDE":
// delete message log record
$dbRes = CSocNetLogComments::GetList(array("ID" => "DESC"), array("EVENT_ID" => "forum", "SOURCE_ID" => $arFields["MID"]), false, false, array("ID"));
while ($arRes = $dbRes->Fetch()) {
$arLogCommentID_Del[] = $arRes["ID"];
}
break;
case "DEL_TOPIC":
case "HIDE_TOPIC":
if (!is_array($arFields["TID"])) {
$arTID = array($arFields["TID"]);
} else {
$arTID = $arFields["TID"];
}
$arLogID_Del = array();
foreach ($arTID as $topic_id_tmp) {
// delete message log records
$dbForumMessage = CForumMessage::GetList(array("ID" => "ASC"), array("TOPIC_ID" => $topic_id_tmp));
示例13: deleteLogComment
private function deleteLogComment($messageID)
{
$dbRes = CSocNetLogComments::GetList(array("ID" => "DESC"), array("EVENT_ID" => "wiki_comment", "SOURCE_ID" => $messageID), false, false, array("ID"));
while ($arRes = $dbRes->Fetch()) {
CSocNetLogComments::Delete($arRes["ID"]);
}
}
示例14: intval
$arParams["FILE_ID"] = intval($_REQUEST["fid"]);
$arParams["PERMISSION"] = false;
$arParams["QUALITY"] = isset($_REQUEST["mobile"]) && $_REQUEST["mobile"] == "y" ? "50" : false;
$arParams["TYPE"] = isset($_REQUEST["ltype"]) && $_REQUEST["ltype"] == "comment" ? "comment" : "post";
$arResult = array();
$arResult["MESSAGE"] = array();
$arResult["FILE"] = array();
$arResult["FILE_INFO"] = array();
$arResult["LOG"] = array();
$user_id = intval($USER->GetID());
$arError = array();
if (intval($arParams["FILE_ID"]) > 0) {
$arResult["FILE"] = CFile::GetFileArray(intval($arParams["FILE_ID"]));
if (!empty($arResult["FILE"])) {
if ($arParams["TYPE"] == "comment") {
$rsComment = CSocNetLogComments::GetList(array(), array("UF_SONET_COM_FILE" => $arParams["FILE_ID"]), false, false, array("ID", "LOG_ID"), array("CHECK_RIGHTS" => "Y"));
if ($rsComment && ($arComment = $rsComment->Fetch())) {
$arResult["FILE_INFO"] = array("LOG_ID" => $arComment["LOG_ID"]);
}
} else {
$rsLog = CSocNetLog::GetList(array(), array("UF_SONET_LOG_FILE" => $arParams["FILE_ID"]), false, false, array("ID"), array("CHECK_RIGHTS" => "Y"));
if ($rsLog && ($arLog = $rsLog->Fetch())) {
$arResult["FILE_INFO"] = array("LOG_ID" => $arLog["ID"]);
}
}
}
}
if (empty($arResult["FILE"])) {
$arError = array("code" => "EMPTY FILE", "title" => GetMessage("F_EMPTY_FID"));
} elseif (empty($arResult["FILE_INFO"])) {
$arError = array("code" => "NOT RIGHT", "title" => GetMessage("F_NOT_RIGHT"));
示例15: onAfterForumMessageDelete
function onAfterForumMessageDelete($ID, $arFields)
{
$val = COption::GetOptionString("intranet", "sonet_log_news_iblock_forum");
if (strlen($val) > 0) {
$arIBlockForum = unserialize($val);
} else {
$arIBlockForum = array();
}
if (CModule::IncludeModule("socialnetwork") && in_array($arFields["FORUM_ID"], $arIBlockForum)) {
$dbRes = CSocNetLogComments::GetList(array("ID" => "DESC"), array("EVENT_ID" => "news_comment", "SOURCE_ID" => $ID), false, false, array("ID"));
if ($arRes = $dbRes->Fetch()) {
CSocNetLogComments::Delete($arRes["ID"]);
}
}
}