Exemplo n.º 1
0
                         CBPDocument::SendExternalEvent($bpId, $bpEvent, array("Groups" => $arCurrentUserGroups, "User" => $USER->GetID()), $arErrorTmp);
                         if (!empty($arErrorsTmp)) {
                             foreach ($arErrorsTmp as $e) {
                                 $strWarning .= $e["message"] . "<br />";
                             }
                         }
                     }
                 }
             }
             $arDocumentStates = null;
             CBPDocument::AddDocumentToHistory(array(MODULE_ID, ENTITY, $ID), $BP_HISTORY_NAME, $USER->GetID());
         }
     }
 }
 if ($strWarning == '') {
     if (!$customTabber->Action()) {
         if ($ex = $APPLICATION->GetException()) {
             $strWarning .= $ex->GetString();
         } else {
             $strWarning .= "Error. ";
         }
     }
 }
 if ($strWarning != '') {
     $error = new _CIBlockError(2, "BAD_SAVE", $strWarning);
     $bVarsFromForm = true;
     $DB->Rollback();
 } else {
     if ($bWorkflow) {
         CIBlockElement::WF_UnLock($ID);
     }