- Модуль: webdav
- Путь к файлу: ~/bitrix/modules/webdav/classes/iblocksocnetevent.php
- Класс: CWebDavSocNetEvent
- Вызов: CWebDavSocNetEvent::_getSocnetLogEntityByComment
private function _getSocnetLogEntityByComment(&$arCommentFields, $create_new_log_entry = true)
{
$result = false;
if (
is_array($arCommentFields)
&& (
!array_key_exists("PARAM1", $arCommentFields)
|| empty($arCommentFields["PARAM1"])
)
&& array_key_exists("PARAM2", $arCommentFields)
&& intval($arCommentFields["PARAM2"]) > 0
)
{
$dbRes = CSocNetLog::GetList(
array("ID" => "DESC"),
array(
"EVENT_ID" => array(ENTITY_FILES_SOCNET_EVENT_ID, ENTITY_FILES_COMMON_EVENT_ID),
"SOURCE_ID" => $arCommentFields["PARAM2"] // file element id
),
false,
false,
array("ID", "ENTITY_TYPE", "ENTITY_ID", "TMP_ID", "COMMENTS_COUNT")
);
if ($arRes = $dbRes->Fetch())
{
$result = $arRes;
}
else
{
if ($create_new_log_entry == true)
{
$this->_fake_update_document($arCommentFields["PARAM2"]);
$result = $this->_getSocnetLogEntityByComment($arCommentFields, false);
}
}
}
return $result;
}