本文整理匯總了PHP中CForumMessage::GetById方法的典型用法代碼示例。如果您正苦於以下問題:PHP CForumMessage::GetById方法的具體用法?PHP CForumMessage::GetById怎麽用?PHP CForumMessage::GetById使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CForumMessage
的用法示例。
在下文中一共展示了CForumMessage::GetById方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array_merge
}
$this->IncludeComponentLang("action.php");
// Check gross errors message data
$APPLICATION->RestartBuffer();
/** @var $request \Bitrix\Main\HttpRequest */
$request = \Bitrix\Main\Context::getCurrent()->getRequest();
$post = array_merge($request->getQueryList()->toArray(), $request->getPostList()->toArray());
if ($post["AJAX_POST"] == "Y") {
CUtil::decodeURIComponent($post);
}
if (!check_bitrix_sessid()) {
$arError[] = array("code" => "session time is up", "title" => GetMessage("F_ERR_SESSION_TIME_IS_UP"));
} elseif ($arResult["USER"]['PERMISSION'] <= "E") {
$arError[] = array("code" => "access denied", "title" => GetMessage("F_ERR_NOT_RIGHT_FOR_ADD"));
} elseif ($post['REVIEW_ACTION'] == "EDIT" || $post['REVIEW_ACTION'] == "DEL") {
$arResult["MESSAGE"] = CForumMessage::GetById($post["MID"]);
if ($arResult["MESSAGE"]["TOPIC_ID"] != $arResult["TOPIC"]["ID"] || $arResult["USER"]["RIGHTS"]["EDIT"] !== "Y" && ($arResult["MESSAGE"]["AUTHOR_ID"] <= 0 || $arResult["MESSAGE"]["AUTHOR_ID"] != $GLOBALS["USER"]->GetID() || $arParams["ALLOW_EDIT_OWN_MESSAGE"] == "LAST" && $arResult["MESSAGE"]["ID"] != $arResult["TOPIC"]["ABS_LAST_MESSAGE_ID"])) {
$arError[] = array("code" => "access denied", "title" => GetMessage("F_ERR_NOT_RIGHT_FOR_EDIT"));
}
}
if (!empty($arError)) {
} elseif ((empty($_REQUEST["preview_comment"]) || $_REQUEST["preview_comment"] == "N") && $_REQUEST["comment_review"] == "Y") {
$arProperties = array();
$needProperty = array();
$strErrorMessage = "";
// Check Captcha
if (!$GLOBALS["USER"]->IsAuthorized() && ($arParams["USE_CAPTCHA"] == "Y" || $arResult["FORUM"]["USE_CAPTCHA"] == "Y")) {
include_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/captcha.php";
$captchaPass = COption::GetOptionString("main", "captcha_password", "");
if ($arResult["FORUM"]["USE_CAPTCHA"] == "Y") {
if (!class_exists("CForumTmpCaptcha")) {