當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CSocNetLogTools::FindFullSetByEventID方法代碼示例

本文整理匯總了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;
開發者ID:Satariall,項目名稱:izurit,代碼行數:31,代碼來源:component.php

示例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;
開發者ID:k-kalashnikov,項目名稱:geekcon_new,代碼行數:31,代碼來源:ajax.php

示例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);
 }
開發者ID:Satariall,項目名稱:izurit,代碼行數:63,代碼來源:rest.php


注:本文中的CSocNetLogTools::FindFullSetByEventID方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。