本文整理汇总了PHP中CIntranetUtils::UpdateOWSVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP CIntranetUtils::UpdateOWSVersion方法的具体用法?PHP CIntranetUtils::UpdateOWSVersion怎么用?PHP CIntranetUtils::UpdateOWSVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIntranetUtils
的用法示例。
在下文中一共展示了CIntranetUtils::UpdateOWSVersion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __InTaskTaskComplete
function __InTaskTaskComplete($taskCompleteId, $iblockId, $taskType, $ownerId, $arTaskStatus, $arParams)
{
$errorMessage = "";
$taskCompleteId = IntVal($taskCompleteId);
if ($taskCompleteId <= 0) {
return "";
}
$arTask = __InTaskGetTask($taskCompleteId, $iblockId, $taskType, $ownerId);
if (!$arTask) {
$errorMessage .= GetMessage("INTL_TASK_NOT_FOUND") . ".";
}
if (StrLen($errorMessage) <= 0) {
if ($arTask["PROPS"]["TASKASSIGNEDTO"]["VALUE"] != $GLOBALS["USER"]->GetID()) {
$errorMessage .= GetMessage("INTL_CAN_NOT_FINISH") . ".";
}
}
if (StrLen($arResult["ErrorMessage"]) <= 0) {
$obIB = new CIBlockElement();
$obIB->SetPropertyValueCode($taskCompleteId, $arTask["PROPS"]["TASKSTATUS"]["ID"], $arTaskStatus["COMPLETED"]["ID"]);
$obIB->SetPropertyValueCode($taskCompleteId, $arTask["PROPS"]["TASKCOMPLETE"]["ID"], array(100));
$obIB->SetPropertyValueCode($taskCompleteId, $arTask["PROPS"]["TASKFINISH"]["ID"], array(Date($GLOBALS["DB"]->DateFormatToPHP(FORMAT_DATETIME))));
// added by sigurd
CIntranetUtils::UpdateOWSVersion($iblockId, $taskCompleteId);
$obIB->Update($taskCompleteId, array('TIMESTAMP_X' => Date($GLOBALS["DB"]->DateFormatToPHP(FORMAT_DATETIME))));
$arMessageFields = array("=DATE_CREATE" => $GLOBALS["DB"]->CurrentTimeFunction(), "MESSAGE_TYPE" => SONET_MESSAGE_SYSTEM, "FROM_USER_ID" => $GLOBALS["USER"]->GetID(), "TO_USER_ID" => $arTask["FIELDS"]["CREATED_BY"]);
if ($arMessageFields["FROM_USER_ID"] != $arMessageFields["TO_USER_ID"]) {
$path2view = ($GLOBALS["APPLICATION"]->IsHTTPS() ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_TASKS_TASK"], array("owner_id" => $arTask["PROPS"]["TASKASSIGNEDTO"]["VALUE"], "task_id" => $taskCompleteId, "action" => "view"));
$arMessageFields["MESSAGE"] = str_replace(array("#URL_VIEW#", "#NAME#"), array($path2view, $arTask["FIELDS"]["NAME"]), GetMessage("INTL_FINISH_MESSAGE"));
CSocNetMessages::Add($arMessageFields);
}
}
return $errorMessage;
}
示例2: array
if ($arParams["ACTION"] == "create" && $GLOBALS["USER"]->GetID() == $taskAssignedToUserId) {
CBPDocument::SendExternalEvent(strlen($arDocumentState["ID"]) <= 0 ? $arWorkflowIds[$arDocumentState["TEMPLATE_ID"]] : $arDocumentState["ID"], "HEEA_NotAccepted_ApproveEvent", array("Groups" => $arCurrentUserGroups, "User" => $GLOBALS["USER"]->GetID()), $arErrorTmp);
if (count($arErrorsTmp) > 0) {
foreach ($arErrorsTmp as $e) {
$arResult["ErrorMessage"] .= $e["message"] . "<br />";
}
}
}
}
$arDocumentStates = null;
}
if (strlen($arResult["ErrorMessage"]) <= 0) {
if ($arParams["ACTION"] == "create") {
CIntranetUtils::UpdateOWSVersion($iblockId, $arParams["TASK_ID"], 1);
} else {
CIntranetUtils::UpdateOWSVersion($iblockId, $arParams["TASK_ID"]);
}
}
if (strlen($arResult["ErrorMessage"]) > 0) {
$arResult["bVarsFromForm"] = true;
} else {
if (array_key_exists("PROPERTY_TaskRemind", $arFields) && strlen($arFields["PROPERTY_TaskRemind"]) > 0) {
CAgent::RemoveAgent("CIntranetTasks::SendRemindEventAgentNew(" . $arParams["TASK_ID"] . ");", "intranet");
CAgent::AddAgent("CIntranetTasks::SendRemindEventAgentNew(" . $arParams["TASK_ID"] . ");", "intranet", "Y", 10, "", "Y", $arFields["PROPERTY_TaskRemind"]);
} else {
CAgent::RemoveAgent("CIntranetTasks::SendRemindEventAgentNew(" . $arParams["TASK_ID"] . ");", "intranet");
}
if (strlen($_POST["save"]) > 0) {
if (array_key_exists("back_url", $_REQUEST) && strlen($_REQUEST["back_url"]) > 0) {
$redirectPath = $_REQUEST["back_url"];
} else {