本文整理汇总了PHP中CBlogComment::UpdateLog方法的典型用法代码示例。如果您正苦于以下问题:PHP CBlogComment::UpdateLog方法的具体用法?PHP CBlogComment::UpdateLog怎么用?PHP CBlogComment::UpdateLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBlogComment
的用法示例。
在下文中一共展示了CBlogComment::UpdateLog方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: BXClearCache
if ($commentID = CBlogComment::Update($commentID, $arFields)) {
BXClearCache(true, "/blog/comment/" . intval($arParams["ID"] / 100) . "/" . $arParams["ID"] . "/");
$images = array();
$res = CBlogImage::GetList(array(), array("POST_ID" => $arPost["ID"], "BLOG_ID" => $arBlog["ID"], "COMMENT_ID" => $commentID, "IS_COMMENT" => "Y"));
while ($aImg = $res->Fetch()) {
$images[$aImg["ID"]] = $aImg["FILE_ID"];
}
$arParamsUpdateLog = array("PATH_TO_SMILE" => $arParams["PATH_TO_SMILE"], "IMAGES" => $images);
if (IntVal($user_id) > 0) {
$arResult["BlogUser"] = CBlogUser::GetByID($user_id, BLOG_BY_USER_ID);
$arResult["BlogUser"] = CBlogTools::htmlspecialcharsExArray($arResult["BlogUser"]);
$dbUser = CUser::GetByID($user_id);
$arResult["arUser"] = $dbUser->GetNext();
$arResult["User"]["NAME"] = CBlogUser::GetUserName($arResult["BlogUser"]["ALIAS"], $arResult["arUser"]["NAME"], $arResult["arUser"]["LAST_NAME"], $arResult["arUser"]["LOGIN"]);
}
CBlogComment::UpdateLog($commentID, $arResult["BlogUser"], $arResult["User"], $arFields, $arPost, $arParamsUpdateLog);
$res = CBlogImage::GetList(array(), array("POST_ID" => $arPost["ID"], "BLOG_ID" => $arBlog["ID"], "IS_COMMENT" => "Y", "COMMENT_ID" => false, "<=TIMESTAMP_X" => ConvertTimeStamp(AddToTimeStamp(array("HH" => -3)), "FULL")));
while ($aImg = $res->Fetch()) {
CBlogImage::Delete($aImg["ID"]);
}
$commentUrl = CComponentEngine::MakePathFromTemplate(htmlspecialcharsBack($arParams["PATH_TO_POST"]), array("post_id" => CBlogPost::GetPostID($arPost["ID"], $arPost["CODE"], $arParams["ALLOW_POST_CODE"]), "user_id" => $arBlog["OWNER_ID"]));
$commentUrl .= strpos($commentUrl, "?") !== false ? "&" : "?";
if (strlen($arFields["PUBLISH_STATUS"]) > 0 && $arFields["PUBLISH_STATUS"] != BLOG_PUBLISH_STATUS_PUBLISH) {
$arResult["MESSAGE"] = GetMessage("B_B_PC_MES_HIDDEN_EDITED");
}
$arResult["ajax_comment"] = $commentID;
$bHasImg = false;
$bHasProps = false;
$dbImg = CBlogImage::GetList(array(), array("BLOG_ID" => $arBlog["ID"], "POST_ID" => $arPost["ID"], "IS_COMMENT" => "Y"), false, false, array("ID"));
if ($dbImg->Fetch()) {
$bHasImg = true;