$arFeedParams["PATH_TO_USER"] = $arParams["PATH_TO_USER"]; $arFeedParams["NO_URL_IN_COMMENTS"] = $arParams["NO_URL_IN_COMMENTS"]; $arFeedParams["NO_URL_IN_COMMENTS_AUTHORITY_CHECK"] = $arParams["NO_URL_IN_COMMENTS_AUTHORITY_CHECK"]; $arFeedParams["NO_URL_IN_COMMENTS_AUTHORITY"] = $arParams["NO_URL_IN_COMMENTS_AUTHORITY"]; } if ($arParams["MODE"] == "C" && !empty($arPost) || $arParams["MODE"] == "P") { $APPLICATION->RestartBuffer(); header("Content-Type: text/xml"); header("Pragma: no-cache"); if ($arParams["CACHE_TIME"] > 0 && $cache->InitCache($arParams["CACHE_TIME"], $cache_id, $cache_path)) { $cache->Output(); } else { if ($arParams["MODE"] == "P") { $textRSS = CBlog::BuildRSS($arBlog["ID"], $arResult["TYPE"], $arParams["MESSAGE_COUNT"], $arParams["PATH_TO_BLOG"], $arParams["PATH_TO_POST"], $arParams["PATH_TO_USER"], $bSoNet, $arFeedParams); } else { $textRSS = CBlogComment::BuildRSS($arPost["ID"], $arBlog["ID"], $arResult["TYPE"], $arParams["MESSAGE_COUNT"], $arFeedParams); } if ($arParams["CACHE_TIME"] > 0) { $cache->StartDataCache($arParams["CACHE_TIME"], $cache_id, $cache_path); } echo $textRSS; if ($arParams["CACHE_TIME"] > 0) { $cache->EndDataCache(array()); } } die; } else { ShowError(GetMessage("BLOG_RSS_NO_BLOG_POST")); CHTTP::SetStatus("404 Not Found"); } } else {
} $cache = new CPHPCache(); $cache_id = "blog_rss_out_" . serialize($arParams); $cache_path = "/" . SITE_ID . "/blog/" . $arBlog["URL"] . "/rss_out/" . $arParams["POST_ID"] . "/" . $arParams["MODE"] . "/" . strtolower($arResult["TYPE"]) . "/"; if (!empty($arBlog)) { if ($arParams["MODE"] != "P" && ($arPost = CBlogPost::GetByID($arParams["POST_ID"])) || $arParams["MODE"] == "P") { $APPLICATION->RestartBuffer(); header("Content-Type: text/xml"); header("Pragma: no-cache"); if ($arParams["CACHE_TIME"] > 0 && $cache->InitCache($arParams["CACHE_TIME"], $cache_id, $cache_path)) { $cache->Output(); } else { if ($arParams["MODE"] == "P") { $textRSS = CBlog::BuildRSS($arBlog["ID"], $arResult["TYPE"], $arParams["MESSAGE_COUNT"], $arParams["PATH_TO_BLOG"], $arParams["PATH_TO_POST"], $arParams["PATH_TO_USER"], $bSoNet); } else { $textRSS = CBlogComment::BuildRSS($arParams["POST_ID"], $arBlog["ID"], $arResult["TYPE"], $arParams["MESSAGE_COUNT"], array("PATH_TO_BLOG" => $arParams["PATH_TO_BLOG"], "PATH_TO_POST" => $arParams["PATH_TO_POST"], "PATH_TO_USER" => $arParams["PATH_TO_USER"])); } if ($arParams["CACHE_TIME"] > 0) { $cache->StartDataCache($arParams["CACHE_TIME"], $cache_id, $cache_path); } echo $textRSS; if ($arParams["CACHE_TIME"] > 0) { $cache->EndDataCache(array()); } } die; } else { ShowError(GetMessage("BLOG_RSS_NO_BLOG_POST")); CHTTP::SetStatus("404 Not Found"); } } else {