本文整理汇总了PHP中CForumTopic::MoveTopic2Forum方法的典型用法代码示例。如果您正苦于以下问题:PHP CForumTopic::MoveTopic2Forum方法的具体用法?PHP CForumTopic::MoveTopic2Forum怎么用?PHP CForumTopic::MoveTopic2Forum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CForumTopic
的用法示例。
在下文中一共展示了CForumTopic::MoveTopic2Forum方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if ($APPLICATION->GetGroupRight("forum") < "W") {
$arFilterAction["PERMISSION_STRONG"] = "Y";
}
$rsData = CForumTopic::GetListEx(array($by => $order), $arFilterAction);
$arID = array();
while ($res = $rsData->Fetch()) {
$arID[] = $res['ID'];
}
if (empty($arID)) {
} else {
switch ($_REQUEST['action']) {
case "delete":
ForumDeleteTopic($arID, $sError, $sOk);
break;
case "move":
if (!CForumTopic::MoveTopic2Forum($arID, intVal($_REQUEST['move_to']))) {
$ex = $APPLICATION->GetException();
if ($ex && ($err = $ex->GetString())) {
$lAdmin->AddUpdateError($err, $ID);
} else {
$lAdmin->AddUpdateError(GetMessage("FM_WRONG_UPDATE"), $ID);
}
}
break;
}
}
}
if (!empty($sError)) {
$lAdmin->AddFilterError($sError);
}
}
示例2: GetMessage
********************************************************************/
/********************************************************************
Action
********************************************************************/
if (strToUpper($_REQUEST["action"]) == "MOVE" && check_bitrix_sessid()) {
$strErrorMessage = "";
$strOKMessage = "";
$result = false;
if (intVal($arParams["newFID"]) <= 0) {
$strErrorMessage = GetMessage("FM_EMPTY_DEST_FORUM") . ". \n";
} else {
$arResult["FORUM_NEW"] = CForumNew::GetByID($arParams["newFID"]);
if (ForumCurrUserPermissions($arParams["newFID"]) < "Q" && $arResult["FORUM_NEW"]["ALLOW_MOVE_TOPIC"] != "Y") {
$strErrorMessage = GetMessage("FM_NO_DEST_FPERMS") . ". \n";
} else {
$result = CForumTopic::MoveTopic2Forum($topics, $arParams["newFID"], $_REQUEST["leaveLink"]);
}
}
if (!$result) {
if ($GLOBALS['APPLICATION']->GetException()) {
$arErr = $GLOBALS['APPLICATION']->ERROR_STACK;
if (is_array($arErr) && count($arErr) > 0) {
foreach ($arErr as $res) {
$strErrorMessage .= $res["msg"] . "\n";
}
}
$err = $GLOBALS['APPLICATION']->GetException();
$strErrorMessage .= $err->GetString();
}
$bVarsFromForm = true;
} else {
示例3: GetMessage
if (ForumCurrUserPermissions($FID) < "Q") {
$APPLICATION->AuthForm(GetMessage("FM_NO_FPERMS"));
}
if ($_SERVER["REQUEST_METHOD"] == "POST" && $_POST["action"] == "move" && check_bitrix_sessid()) {
if (IntVal($newFID) <= 0) {
$strErrorMessage .= GetMessage("FM_EMPTY_DEST_FORUM") . ". \n";
}
if (strlen($strErrorMessage) <= 0) {
$NewForum = CForumNew::GetByIDEx($newFID);
if (ForumCurrUserPermissions($newFID) < "Q" && $NewForum["ALLOW_MOVE_TOPIC"] != "Y") {
$strErrorMessage .= GetMessage("FM_NO_DEST_FPERMS") . ". \n";
}
}
if (strlen($strErrorMessage) <= 0) {
foreach ($arTopic as $Topic) {
$res = CForumTopic::MoveTopic2Forum($Topic["ID"], $newFID);
if (!$res) {
$strErrorMessage .= GetMessage("FM_ERR_MOVE_TOPIC") . ". \n";
}
// elseif ($MakeNew)
// {
// foreach ($res as $MID)
// {
// CForumMessage::SendMailMessage($MID, array(), false, "NEW_FORUM_MESSAGE");
// }
// }
}
}
if (strlen($strErrorMessage) > 0) {
$bVarsFromForm = true;
} else {