当前位置: 首页>>代码示例>>PHP>>正文


PHP CIntranetUtils::UpdateOWSVersion方法代码示例

本文整理汇总了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;
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:33,代码来源:action.php

示例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 {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php


注:本文中的CIntranetUtils::UpdateOWSVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。