Ejemplo n.º 1
0
					$arFilter,
					false,
					false,
					$arSelect,
					$arListParams
				);

				while($arComments = $dbComments->GetNext())
				{
					if (defined("BX_COMP_MANAGED_CACHE"))
					{
						$GLOBALS["CACHE_MANAGER"]->RegisterTag("USER_NAME_".intval($arComments["USER_ID"]));
						$GLOBALS["CACHE_MANAGER"]->RegisterTag("SONET_LOG_COMMENT_".intval($arComments["ID"]));
					}

					$arResult["arComments"][] = __SLEGetLogCommentRecord($arComments, $arParams, false);
				}

				if (is_object($cache))
				{
					$arCacheData = Array(
						"COMMENTS_FULL_LIST" => $arResult["arComments"]
					);
					$cache->EndDataCache($arCacheData);
					if(defined("BX_COMP_MANAGED_CACHE"))
						$GLOBALS["CACHE_MANAGER"]->EndTagCache();
				}
			}

			foreach ($arResult["arComments"] as $key => $arCommentTmp)
			{
Ejemplo n.º 2
0
     $arUFMeta = __SLGetUFMeta();
     $arNavParams = $arParams["COMMENT_ID"] <= 0 ? array("nTopCount" => $nTopCount) : false;
     $arAssets = array("CSS" => array(), "JS" => array());
     $dbComments = CSocNetLogComments::GetList(array("LOG_DATE" => "DESC"), $arFilter, false, $arNavParams, $arSelect, $arListParams);
     while ($arComments = $dbComments->GetNext()) {
         if (defined("BX_COMP_MANAGED_CACHE")) {
             $GLOBALS["CACHE_MANAGER"]->RegisterTag("USER_NAME_" . intval($arComments["USER_ID"]));
         }
         $arComments["UF"] = $arUFMeta;
         foreach ($arUFMeta as $field_name => $arUF) {
             if (array_key_exists($field_name, $arComments)) {
                 $arComments["UF"][$field_name]["VALUE"] = $arComments[$field_name];
                 $arComments["UF"][$field_name]["ENTITY_VALUE_ID"] = $arComments["ID"];
             }
         }
         $arCommentsFullList[] = __SLEGetLogCommentRecord($arComments, $arParams, $arAssets);
     }
     if (is_object($cache)) {
         $arCacheData = array("COMMENTS_FULL_LIST" => $arCommentsFullList, "Assets" => $arAssets);
         $cache->EndDataCache($arCacheData);
         if (defined("BX_COMP_MANAGED_CACHE")) {
             $GLOBALS["CACHE_MANAGER"]->EndTagCache();
         }
     }
 }
 $arCommentsFullListCut = array();
 $arCommentID = array();
 foreach ($arCommentsFullList as $key => $arCommentTmp) {
     if ($key === 0) {
         $rating_entity_type = $arCommentTmp["EVENT"]["RATING_TYPE_ID"];
     }
Ejemplo n.º 3
0
         $GLOBALS["CACHE_MANAGER"]->StartTagCache($cache_path);
         $GLOBALS["CACHE_MANAGER"]->RegisterTag("SONET_LOG_" . $arParams["LOG_ID"]);
     }
     $arFilter = array("LOG_ID" => $arParams["LOG_ID"]);
     $arSelect = array("ID", "LOG_ID", "SOURCE_ID", "ENTITY_TYPE", "ENTITY_ID", "USER_ID", "EVENT_ID", "LOG_DATE", "MESSAGE", "TEXT_MESSAGE", "URL", "MODULE_ID", "GROUP_NAME", "GROUP_OWNER_ID", "GROUP_VISIBLE", "GROUP_OPENED", "GROUP_IMAGE_ID", "USER_NAME", "USER_LAST_NAME", "USER_SECOND_NAME", "USER_LOGIN", "USER_PERSONAL_PHOTO", "USER_PERSONAL_GENDER", "CREATED_BY_NAME", "CREATED_BY_LAST_NAME", "CREATED_BY_SECOND_NAME", "CREATED_BY_LOGIN", "CREATED_BY_PERSONAL_PHOTO", "CREATED_BY_PERSONAL_GENDER", "LOG_SITE_ID", "LOG_SOURCE_ID", "RATING_TYPE_ID", "RATING_ENTITY_ID");
     if ($GLOBALS["DB"]->type == "MYSQL") {
         $arSelect[] = "LOG_DATE_TS";
     }
     $arListParams = array("USE_SUBSCRIBE" => "N", "CHECK_RIGHTS" => "N");
     $dbComments = CSocNetLogComments::GetList(array("LOG_DATE" => "DESC"), $arFilter, false, false, $arSelect, $arListParams);
     while ($arComments = $dbComments->GetNext()) {
         if (defined("BX_COMP_MANAGED_CACHE")) {
             $GLOBALS["CACHE_MANAGER"]->RegisterTag("USER_CARD_" . intval($arComments["USER_ID"] / 100));
             $GLOBALS["CACHE_MANAGER"]->RegisterTag("SONET_LOG_COMMENT_" . intval($arComments["ID"]));
         }
         $arCommentsFullList[] = __SLEGetLogCommentRecord($arComments, $arParams, $arCurrentUserSubscribe);
     }
     if (is_object($cache)) {
         $arCacheData = array("COMMENTS_FULL_LIST" => $arCommentsFullList);
         $cache->EndDataCache($arCacheData);
         if (defined("BX_COMP_MANAGED_CACHE")) {
             $GLOBALS["CACHE_MANAGER"]->EndTagCache();
         }
     }
 }
 $arCommentsFullListCut = array();
 $arCommentID = array();
 foreach ($arCommentsFullList as $key => $arCommentTmp) {
     if ($key === 0) {
         $rating_entity_type = $arCommentTmp["EVENT"]["RATING_TYPE_ID"];
     }
Ejemplo n.º 4
0
     $arSelect = array("ID", "LOG_ID", "SOURCE_ID", "ENTITY_TYPE", "ENTITY_ID", "USER_ID", "EVENT_ID", "LOG_DATE", "MESSAGE", "TEXT_MESSAGE", "URL", "MODULE_ID", "GROUP_NAME", "GROUP_OWNER_ID", "GROUP_VISIBLE", "GROUP_OPENED", "GROUP_IMAGE_ID", "USER_NAME", "USER_LAST_NAME", "USER_SECOND_NAME", "USER_LOGIN", "USER_PERSONAL_PHOTO", "USER_PERSONAL_GENDER", "CREATED_BY_NAME", "CREATED_BY_LAST_NAME", "CREATED_BY_SECOND_NAME", "CREATED_BY_LOGIN", "CREATED_BY_PERSONAL_PHOTO", "CREATED_BY_PERSONAL_GENDER", "LOG_SITE_ID", "LOG_SOURCE_ID", "RATING_TYPE_ID", "RATING_ENTITY_ID", "UF_*");
     $arUFMeta = __SLGetUFMeta();
     $arAssets = array("CSS" => array(), "JS" => array());
     $dbComments = CSocNetLogComments::GetList(array("LOG_DATE" => "ASC"), $arFilter, false, false, $arSelect, $arListParams);
     while ($arComments = $dbComments->GetNext()) {
         if (defined("BX_COMP_MANAGED_CACHE")) {
             $GLOBALS["CACHE_MANAGER"]->RegisterTag("USER_NAME_" . intval($arComments["USER_ID"]));
         }
         $arComments["UF"] = $arUFMeta;
         foreach ($arUFMeta as $field_name => $arUF) {
             if (array_key_exists($field_name, $arComments)) {
                 $arComments["UF"][$field_name]["VALUE"] = $arComments[$field_name];
                 $arComments["UF"][$field_name]["ENTITY_VALUE_ID"] = $arComments["ID"];
             }
         }
         $arResult["arComments"][$arComments["ID"]] = __SLEGetLogCommentRecord($arComments, $arParams, $arAssets);
     }
     if (is_object($cache)) {
         $arCacheData = array("COMMENTS_FULL_LIST" => $arResult["arComments"], "Assets" => $arAssets);
         $cache->EndDataCache($arCacheData);
         if (defined("BX_COMP_MANAGED_CACHE")) {
             $GLOBALS["CACHE_MANAGER"]->EndTagCache();
         }
     }
 }
 if (intval($_REQUEST["commentID"]) > 0 || intval($_REQUEST["commentTS"]) > 0) {
     foreach ($arResult["arComments"] as $key => $res) {
         if (intval($_REQUEST["commentTS"]) > 0 && $res["LOG_DATE_TS"] >= $_REQUEST["commentTS"] || intval($_REQUEST["commentTS"]) <= 0 && $key >= $_REQUEST["commentID"]) {
             unset($arResult["arComments"][$key]);
         }
     }