本文整理汇总了PHP中CSocNetLogTools::FindFullSetByEventID方法的典型用法代码示例。如果您正苦于以下问题:PHP CSocNetLogTools::FindFullSetByEventID方法的具体用法?PHP CSocNetLogTools::FindFullSetByEventID怎么用?PHP CSocNetLogTools::FindFullSetByEventID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSocNetLogTools
的用法示例。
在下文中一共展示了CSocNetLogTools::FindFullSetByEventID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
$arResult["IS_FILTERED"] = true;
$arParams["SET_LOG_COUNTER"] = $arParams["SET_LOG_PAGE_CACHE"] = "N";
$arParams["USE_FOLLOW"] = "N";
} elseif (is_array($arParams["EVENT_ID"])) {
if (!in_array("all", $arParams["EVENT_ID"])) {
$event_id_fullset_tmp = array();
foreach ($arParams["EVENT_ID"] as $event_id_tmp) {
$event_id_fullset_tmp = array_merge($event_id_fullset_tmp, CSocNetLogTools::FindFullSetByEventID($event_id_tmp));
}
$arFilter["EVENT_ID"] = array_unique($event_id_fullset_tmp);
$arResult["IS_FILTERED"] = true;
$arParams["SET_LOG_COUNTER"] = $arParams["SET_LOG_PAGE_CACHE"] = "N";
$arParams["USE_FOLLOW"] = "N";
}
} elseif ($arParams["EVENT_ID"]) {
$arFilter["EVENT_ID"] = CSocNetLogTools::FindFullSetByEventID($arParams["EVENT_ID"]);
$arResult["IS_FILTERED"] = true;
$arParams["SET_LOG_COUNTER"] = $arParams["SET_LOG_PAGE_CACHE"] = "N";
$arParams["USE_FOLLOW"] = "N";
} elseif ($preset_filter_id == "extranet") {
$arResult["IS_FILTERED"] = true;
$arParams["SET_LOG_COUNTER"] = $arParams["SET_LOG_PAGE_CACHE"] = "N";
$arParams["USE_FOLLOW"] = "N";
}
if (IntVal($arParams["CREATED_BY_ID"]) > 0) {
if ($bGetComments) {
$arFilter["USER_ID|COMMENT_USER_ID"] = $arParams["CREATED_BY_ID"];
} else {
$arFilter["USER_ID"] = $arParams["CREATED_BY_ID"];
}
$arResult["IS_FILTERED"] = true;
示例2: elseif
if (!array_key_exists("TRANSPORT", $arFieldsSet)) {
$arFieldsSet["TRANSPORT"] = "I";
}
$idTmp = CSocNetLogEvents::Add($arFieldsSet);
}
}
}
} elseif ($action == "set_transport_arr") {
$arFields = false;
if (is_array($ls_arr)) {
foreach ($ls_arr as $ls => $transport) {
$ls = trim($ls);
if (in_array($ls, array("EVENT", "ALL"))) {
$arFields = array("USER_ID" => $GLOBALS["USER"]->GetID(), "ENTITY_TYPE" => $entity_type, "ENTITY_ID" => $entity_id, "ENTITY_CB" => "N");
if ($ls == "EVENT") {
$arEventID = CSocNetLogTools::FindFullSetByEventID($event_id);
} else {
$arEventID = array("all");
}
} elseif (in_array($ls, array("CB_ALL"))) {
$arFields = array("USER_ID" => $GLOBALS["USER"]->GetID(), "ENTITY_TYPE" => SONET_SUBSCRIBE_ENTITY_USER, "ENTITY_ID" => $cb_id, "ENTITY_CB" => "Y");
$arEventID = array("all");
}
if ($arFields && strlen($transport) > 0) {
if ($arFields["ENTITY_CB"] != "Y" && array_key_exists($entity_type, $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"]) && array_key_exists("HAS_SITE_ID", $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$entity_type]) && $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$entity_type]["HAS_SITE_ID"] == "Y" && strlen($site_id) > 0) {
$arFieldsVal["SITE_ID"] = $site_id;
} else {
$arFieldsVal["SITE_ID"] = false;
}
if (strlen($transport) > 0) {
$arFieldsVal["TRANSPORT"] = $transport;
示例3: getBlogPost
public static function getBlogPost($arFields, $n, $server)
{
$result = array();
if (!CModule::IncludeModule("blog")) {
return $result;
}
$tzOffset = CTimeZone::GetOffset();
$arOrder = array("LOG_UPDATE" => "DESC");
$arAccessCodes = $GLOBALS["USER"]->GetAccessCodes();
foreach ($arAccessCodes as $i => $code) {
if (!preg_match("/^(U|D|DR)/", $code)) {
unset($arAccessCodes[$i]);
}
}
$arEventId = array("blog_post", "blog_post_important");
$arEventIdFullset = array();
foreach ($arEventId as $eventId) {
$arEventIdFullset = array_merge($arEventIdFullset, CSocNetLogTools::FindFullSetByEventID($eventId));
}
$arFilter = array("LOG_RIGHTS" => $arAccessCodes, "EVENT_ID" => array_unique($arEventIdFullset), "SITE_ID" => array('s1', false), "<=LOG_DATE" => "NOW");
$arListParams = array("CHECK_RIGHTS" => "Y", "USE_FOLLOW" => "N", "USE_SUBSCRIBE" => "N");
$dbLog = CSocNetLog::GetList($arOrder, $arFilter, false, self::getNavData($n), array("ID", "SOURCE_ID"), $arListParams);
while ($arLog = $dbLog->Fetch()) {
$arPostId[] = $arLog["SOURCE_ID"];
}
$arPostIdToGet = array();
$cacheTtl = 2592000;
foreach ($arPostId as $key => $postId) {
$cacheId = 'blog_post_socnet_rest_' . $postId . '_ru' . ($tzOffset != 0 ? '_' . $tzOffset : '');
$cacheDir = '/blog/socnet_post/gen/' . intval($postId / 100) . '/' . $postId;
$obCache = new CPHPCache();
if ($obCache->InitCache($cacheTtl, $cacheId, $cacheDir)) {
$result[$key] = $obCache->GetVars();
} else {
$arPostIdToGet[$key] = $postId;
}
$obCache->EndDataCache();
}
if (!empty($arPostIdToGet)) {
foreach ($arPostIdToGet as $key => $postId) {
$cacheId = 'blog_post_socnet_rest_' . $postId . '_ru' . ($tzOffset != 0 ? '_' . $tzOffset : '');
$cacheDir = '/blog/socnet_post/gen/' . intval($postId / 100) . '/' . $postId;
$obCache = new CPHPCache();
$obCache->InitCache($cacheTtl, $cacheId, $cacheDir);
$obCache->StartDataCache();
$dbPost = CBlogPost::GetList(array(), array("ID" => $postId), false, false, array("ID", "BLOG_ID", "PUBLISH_STATUS", "TITLE", "AUTHOR_ID", "ENABLE_COMMENTS", "NUM_COMMENTS", "VIEWS", "CODE", "MICRO", "DETAIL_TEXT", "DATE_PUBLISH", "CATEGORY_ID", "HAS_SOCNET_ALL", "HAS_TAGS", "HAS_IMAGES", "HAS_PROPS", "HAS_COMMENT_IMAGES"));
if ($arPost = $dbPost->Fetch()) {
if ($arPost["PUBLISH_STATUS"] != BLOG_PUBLISH_STATUS_PUBLISH) {
unset($arPost);
} else {
if ($arPost["HAS_PROPS"] != "N") {
$arPostFields = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("BLOG_POST", $arPost["ID"], LANGUAGE_ID);
$arPost = array_merge($arPost, $arPostFields);
}
$result[$key] = $arPost;
}
}
$obCache->EndDataCache($arPost);
}
}
ksort($result);
return self::setNavData($result, $dbLog);
}