本文整理汇总了PHP中CTicket::UpdateLastParamsN方法的典型用法代码示例。如果您正苦于以下问题:PHP CTicket::UpdateLastParamsN方法的具体用法?PHP CTicket::UpdateLastParamsN怎么用?PHP CTicket::UpdateLastParamsN使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTicket
的用法示例。
在下文中一共展示了CTicket::UpdateLastParamsN方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DeleteMessage
function DeleteMessage($ID, $checkRights = "Y")
{
$err_mess = CTicket::err_mess() . "<br>Function: DeleteMessage<br>Line: ";
global $DB;
$ID = intval($ID);
if ($ID <= 0) {
return;
}
$bAdmin = "N";
if ($checkRights == "Y") {
$bAdmin = CTicket::IsAdmin() ? "Y" : "N";
} else {
$bAdmin = "Y";
}
if ($bAdmin == "Y") {
$strSql = "\n\t\t\t\tSELECT\n\t\t\t\t\tF.ID FILE_ID,\n\t\t\t\t\tM.TICKET_ID\n\t\t\t\tFROM\n\t\t\t\t\tb_ticket_message M\n\t\t\t\tLEFT JOIN b_ticket_message_2_file MF ON (MF.MESSAGE_ID = M.ID)\n\t\t\t\tLEFT JOIN b_file F ON (F.ID = MF.FILE_ID)\n\t\t\t\tWHERE\n\t\t\t\t\tM.ID='{$ID}'\n\t\t\t\t";
$z = $DB->Query($strSql, false, $err_mess . __LINE__);
while ($zr = $z->Fetch()) {
$ticketID = $zr["TICKET_ID"];
if (intval($zr["FILE_ID"]) > 0) {
CFile::Delete($zr["FILE_ID"]);
}
}
$z = $DB->Query("DELETE FROM b_ticket_message WHERE ID='{$ID}'", false, $err_mess . __LINE__);
if (intval($z->AffectedRowsCount()) > 0) {
//CTicket::UpdateLastParams($ticketID);
//CTicket::UpdateLastParams2($ticketID, CTicket::DELETE);
CTicket::UpdateLastParamsN($ticketID, array("EVENT" => array(CTicket::DELETE)), true, true);
if (CSupportSearch::isIndexExists()) {
CSupportSearch::reindexTicket($ticketID);
}
}
}
}
示例2: Set
//.........这里部分代码省略.........
unset($v->arrOldFields["SLA_ID"]);
unset($v->arrOldFields["CATEGORY_ID"]);
unset($v->arrOldFields["DIFFICULTY_ID"]);
unset($v->arrOldFields["STATUS_ID"]);
}
// если update автора не прошел то
if (intval($v->SupportClientUpdateRes) <= 0) {
// убираем из массива исходных значений то что может менять только автор
unset($v->arrOldFields["MARK_ID"]);
}
}
// если состоялся один из updat'ов то
if (intval($v->SupportTeamUpdateRes) > 0 || intval($v->SupportClientUpdateRes) > 0) {
// добавляем сообщение
$arFields["MESSAGE_CREATED_MODULE_NAME"] = $arFields["MODIFIED_MODULE_NAME"];
if (is_set($arFields, "IMAGE")) {
$arFields["FILES"][] = $arFields["IMAGE"];
}
$arFiles = null;
$MID = CTicket::AddMessage($f->ID, $arFields, $arFiles, $v->CHECK_RIGHTS);
$v->arrFILES = $arFiles;
$MID = intval($MID);
$dateType = array();
$dateType["EVENT"] = array(CTicket::UPDATE);
if ($v->newSLA) {
$dateType["EVENT"][] = CTicket::NEW_SLA;
$dateType["OLD_SLA_RESPONSE_TIME"] = $v->arrOldFields["RESPONSE_TIME"];
$dateType["OLD_SLA_RESPONSE_TIME_UNIT"] = $v->arrOldFields["RESPONSE_TIME_UNIT"];
}
if ($f->REOPEN == "Y") {
$dateType["EVENT"][] = CTicket::REOPEN;
}
//CTicket::UpdateLastParams2($f->ID, $dateType);
CTicket::UpdateLastParamsN($f->ID, $dateType, true, true);
/*// если обращение закрывали то
if($v->closeDate)
{
// удалим агентов-напоминальщиков и обновим параметры обращения
CTicketReminder::Remove($f->ID);
}*/
if (is_array($v->arrOldFields) && is_array($arFields)) {
// определяем что изменилось
$v->arChange = array();
if ($MID > 0) {
if ($arFields["HIDDEN"] != "Y") {
$v->arChange["MESSAGE"] = "Y";
} else {
$v->arChange["HIDDEN_MESSAGE"] = "Y";
}
}
if ($arFields["CLOSE"] == "Y" && strlen($v->arrOldFields["DATE_CLOSE"]) <= 0) {
$v->arChange["CLOSE"] = "Y";
} elseif ($arFields["CLOSE"] == "N" && strlen($v->arrOldFields["DATE_CLOSE"]) > 0) {
$v->arChange["OPEN"] = "Y";
}
if (array_key_exists("HOLD_ON", $arFields)) {
if ($v->arrOldFields["HOLD_ON"] == null) {
$v->arrOldFields["HOLD_ON"] = 'N';
}
if ($arFields["HOLD_ON"] == null) {
$arFields["HOLD_ON"] = 'N';
}
if ($v->arrOldFields["HOLD_ON"] != $arFields["HOLD_ON"]) {
if ($arFields["HOLD_ON"] == "Y") {
$v->arChange["HOLD_ON_ON"] = "Y";
} else {
示例3: array
}
}
}
}
if (CheckFields()) {
$IS_SPAM = $str_IS_SPAM == "Y" || $str_IS_SPAM == "N" ? $str_IS_SPAM : "";
$IS_HIDDEN = $str_IS_HIDDEN == "Y" || $str_IS_HIDDEN == "N" ? $str_IS_HIDDEN : "";
$IS_LOG = $str_IS_LOG == "Y" || $str_IS_LOG == "N" ? $str_IS_LOG : "";
$IS_OVERDUE = $str_IS_OVERDUE == "Y" || $str_IS_OVERDUE == "N" ? $str_IS_OVERDUE : "";
$arFields = array("C_NUMBER" => $C_NUMBER, "MESSAGE" => $MESSAGE, "SOURCE_ID" => $SOURCE_ID, "OWNER_SID" => $OWNER_SID, "OWNER_USER_ID" => $OWNER_USER_ID, "EXTERNAL_ID" => $EXTERNAL_ID, "EXTERNAL_FIELD_1" => $EXTERNAL_FIELD_1, "IS_SPAM" => $IS_SPAM, "TASK_TIME" => $TASK_TIME, "IS_HIDDEN" => $IS_HIDDEN, "IS_LOG" => $IS_LOG, "IS_OVERDUE" => $IS_OVERDUE, "NOT_CHANGE_STATUS" => $NOT_CHANGE_STATUS, "FILES" => $arrFILES);
if ($IS_LOG == "Y") {
unset($arFields["TASK_TIME"]);
}
CTicket::UpdateMessage($ID, $arFields);
//CTicket::UpdateLastParams2($TICKET_ID);
CTicket::UpdateLastParamsN($TICKET_ID, array("EVENT" => array(CTicket::UPDATE)), true, true);
if (!$strError) {
if (strlen($save) > 0) {
LocalRedirect($TICKET_EDIT_URL . "?lang=" . LANGUAGE_ID . "&ID=" . $TICKET_ID);
} elseif (strlen($apply) > 0) {
LocalRedirect($TICKET_MESSAGE_EDIT_URL . "?ID=" . $ID . "&TICKET_ID=" . $TICKET_ID . "&lang=" . LANGUAGE_ID);
}
}
} else {
if ($e = $APPLICATION->GetException()) {
$strError = new CAdminMessage(GetMessage("SUP_ERROR"), $e);
}
}
}
$message = CTicket::GetMessageByID($ID);
if (!$message->ExtractFields()) {