Example #1
0
         $arDiskUFEntity["BLOG_POST"][] = $arEventsID["SOURCE_ID"];
     } elseif (!in_array($arEventsID["EVENT_ID"], array("data", "photo", "photo_photo", "bitrix24_new_user", "intranet_new_user", "news"))) {
         $arDiskUFEntity["SONET_LOG"][] = $arEventsID["ID"];
     }
 }
 if (isset($arDiskUFEntity) && (!empty($arDiskUFEntity["SONET_LOG"]) || !empty($arDiskUFEntity["BLOG_POST"]))) {
     $events = GetModuleEvents("socialnetwork", "OnAfterFetchDiskUfEntity");
     while ($arEvent = $events->Fetch()) {
         ExecuteModuleEventEx($arEvent, array($arDiskUFEntity));
     }
 }
 if (!empty($arActivity2Log) && CModule::IncludeModule('crm') && CModule::IncludeModule('tasks')) {
     $rsActivity = CCrmActivity::GetList(array(), array("@ID" => array_keys($arActivity2Log), "TYPE_ID" => CCrmActivityType::Task, "CHECK_PERMISSIONS" => "N"), false, false, array("ID", "ASSOCIATED_ENTITY_ID"));
     while (($arActivity = $rsActivity->Fetch()) && intval($arActivity["ASSOCIATED_ENTITY_ID"]) > 0) {
         $taskItem = new CTaskItem(intval($arActivity["ASSOCIATED_ENTITY_ID"]), $GLOBALS["USER"]->GetId());
         if (!$taskItem->CheckCanRead()) {
             unset($arActivity2Log[$arActivity["ID"]]);
         }
     }
 }
 if ($bFirstPage) {
     $last_date = $arTmpEventsNew[count($arTmpEventsNew) - 1][$arParams["USE_FOLLOW"] == "Y" ? "DATE_FOLLOW" : "LOG_UPDATE"];
 } elseif ($dbEventsID && $dbEventsID->NavContinue() && ($arEvents = $dbEventsID->GetNext())) {
     $next_page_date = $arParams["USE_FOLLOW"] == "Y" ? $arEvents["DATE_FOLLOW"] : $arEvents["LOG_UPDATE"];
     if ($GLOBALS["USER"]->IsAuthorized() && $arResult["LAST_LOG_TS"] < MakeTimeStamp($next_page_date)) {
         $next_page_date = $arResult["LAST_LOG_TS"];
     }
 }
 if ($cnt == 0 && isset($dateLastPageStart) && $GLOBALS["USER"]->IsAuthorized() && $arParams["SET_LOG_PAGE_CACHE"] == "Y") {
     CSocNetLogPages::DeleteEx($user_id, SITE_ID, $arParams["PAGE_SIZE"], strlen($arResult["COUNTER_TYPE"]) > 0 ? $arResult["COUNTER_TYPE"] : "**");
 }