Upgrade PHP files
This commit is contained in:
@@ -7,9 +7,7 @@ use ProcessMaker\BusinessModel\Task as BusinessModelTask;
|
||||
use ProcessMaker\BusinessModel\User as BusinessModelUser;
|
||||
use ProcessMaker\BusinessModel\WebEntryEvent;
|
||||
use ProcessMaker\Cases\CasesTrait;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
use ProcessMaker\ChangeLog\ChangeLog;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Model\AppDelay as Delay;
|
||||
use ProcessMaker\Model\AppThread as Thread;
|
||||
@@ -858,7 +856,6 @@ class Cases
|
||||
$aFieldsHistory['APP_DATA'] = serialize($FieldsDifference);
|
||||
$appHistory->insertHistory($aFieldsHistory);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$type = isset($Fields['OBJECT_TYPE']) ?
|
||||
$Fields['OBJECT_TYPE'] : ChangeLog::getChangeLog()->getObjectNameById(ChangeLog::DYNAFORM);
|
||||
ChangeLog::getChangeLog()
|
||||
@@ -870,7 +867,6 @@ class Cases
|
||||
->getTasIdByTasUid($Fields['TAS_UID'])
|
||||
->getObjectIdByUidAndObjType($Fields['CURRENT_DYNAFORM'], $type)
|
||||
->register();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
}
|
||||
// End Save History
|
||||
@@ -922,7 +918,6 @@ class Cases
|
||||
$appAssignSelfServiceValue->remove($appUid);
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (!isset($Fields['DEL_INDEX'])) {
|
||||
$Fields['DEL_INDEX'] = 1;
|
||||
}
|
||||
@@ -930,7 +925,6 @@ class Cases
|
||||
unset($Fields['DEL_INIT_DATE']);
|
||||
unset($Fields['DEL_DELEGATE_DATE']);
|
||||
$inbox->update($Fields);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
return $Fields;
|
||||
} catch (Exception $e) {
|
||||
@@ -1042,7 +1036,6 @@ class Cases
|
||||
if ($this->appSolr != null) {
|
||||
$this->appSolr->deleteApplicationSearchIndex($sAppUid);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(ListInboxPeer::APP_UID, $sAppUid);
|
||||
ListInboxPeer::doDelete($oCriteria);
|
||||
@@ -1061,7 +1054,7 @@ class Cases
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(ListUnassignedPeer::APP_UID, $sAppUid);
|
||||
ListUnassignedPeer::doDelete($oCriteria);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Logger deleteCase
|
||||
$nameFiles = '';
|
||||
foreach (debug_backtrace() as $node) {
|
||||
@@ -1097,10 +1090,10 @@ class Cases
|
||||
$oAppDel = AppDelegationPeer::retrieveByPk($sAppUid, $iDelIndex);
|
||||
$oAppDel->setDelInitDate("now");
|
||||
$oAppDel->save();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$inbox = new ListInbox();
|
||||
$inbox->update(array('APP_UID' => $sAppUid, 'DEL_INDEX' => $iDelIndex, 'DEL_INIT_DATE' => Date("Y-m-d H:i:s")));
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//update searchindex
|
||||
if ($this->appSolr != null) {
|
||||
$this->appSolr->updateApplicationSearchIndex($sAppUid);
|
||||
@@ -1137,9 +1130,8 @@ class Cases
|
||||
|
||||
//Delete record of the table APP_ASSIGN_SELF_SERVICE_VALUE
|
||||
$appAssignSelfServiceValue = new AppAssignSelfServiceValue();
|
||||
|
||||
$appAssignSelfServiceValue->remove($sAppUid, $iDelIndex);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Delete record of the table LIST_UNASSIGNED
|
||||
$unassigned = new ListUnassigned();
|
||||
$unassigned->remove($sAppUid, $iDelIndex);
|
||||
@@ -1148,7 +1140,6 @@ class Cases
|
||||
$aFields['APP_STATUS'] = 'TO_DO';
|
||||
$inbox = new ListInbox();
|
||||
$inbox->update($aFields, true);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
} catch (exception $e) {
|
||||
throw ($e);
|
||||
}
|
||||
@@ -1932,7 +1923,6 @@ class Cases
|
||||
throw (new PropelException('The row cannot be created!', new PropelException($msg)));
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$delIndex = $appDel->getDelIndex();
|
||||
$inbox = new ListInbox();
|
||||
$inbox->remove($appUid, $delIndex);
|
||||
@@ -1942,7 +1932,6 @@ class Cases
|
||||
$data['USR_UID'] = $appDel->getUsrUid();
|
||||
$listParticipatedLast = new ListParticipatedLast();
|
||||
$listParticipatedLast->refresh($data);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
/** Update search index */
|
||||
@@ -1990,7 +1979,6 @@ class Cases
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$inbox = new ListInbox();
|
||||
$data = [];
|
||||
$inbox->remove($appUid, $delIndex);
|
||||
@@ -2000,7 +1988,6 @@ class Cases
|
||||
$data['USR_UID'] = $user;
|
||||
$listParticipatedLast = new ListParticipatedLast();
|
||||
$listParticipatedLast->refresh($data);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
/** Update search index */
|
||||
if ($this->appSolr != null) {
|
||||
@@ -2181,7 +2168,6 @@ class Cases
|
||||
$this->appSolr->updateApplicationSearchIndex($appUid);
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$fields['TAS_UID'] = $tasUid;
|
||||
$fields['USR_UID'] = $usrUid;
|
||||
$fields['DEL_INDEX'] = $delIndex;
|
||||
@@ -2202,7 +2188,6 @@ class Cases
|
||||
$inbox = new ListInbox();
|
||||
$inbox->newRow($fields, $usrUid, $isSelfService);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
} catch (Exception $e) {
|
||||
throw ($e);
|
||||
}
|
||||
@@ -3403,14 +3388,12 @@ class Cases
|
||||
//Execute the trigger defined in the step
|
||||
$lastFields = $this->executeTriggerFromList($triggersList, $fieldsCase, $stepType, $stepUidObj, $triggerType);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$usrUid = empty($_SESSION['USER_LOGGED']) ? '' : $_SESSION['USER_LOGGED'];
|
||||
ChangeLog::getChangeLog()
|
||||
->setObjectUid($stepUidObj)
|
||||
->getUsrIdByUsrUid($usrUid, true)
|
||||
->getTasIdByTasUid($tasUid, true)
|
||||
->getExecutedAtIdByTriggerType($triggerType);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
return $lastFields;
|
||||
}
|
||||
@@ -3462,21 +3445,17 @@ class Cases
|
||||
$oPMScript = new PMScript();
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$cs = new CodeScanner(config("system.workspace"));
|
||||
$foundDisabledCode = "";
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$varInAfterRouting = false;
|
||||
$fieldsTrigger = [];
|
||||
foreach ($triggersList as $trigger) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$disabledCode = $this->codeScannerReview($cs, $trigger["TRI_WEBBOT"], $trigger["TRI_TITLE"]);
|
||||
if (!empty($disabledCode)) {
|
||||
$foundDisabledCode .= $disabledCode;
|
||||
continue;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$oPMScript->setFields($fieldsCase);
|
||||
$execute = true;
|
||||
@@ -3531,7 +3510,6 @@ class Cases
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (!empty($foundDisabledCode)) {
|
||||
G::SendTemporalMessage(
|
||||
G::LoadTranslation("ID_DISABLED_CODE_TRIGGER_TO_EXECUTE", [$foundDisabledCode]),
|
||||
@@ -3539,7 +3517,6 @@ class Cases
|
||||
"string"
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
return $fieldsCase;
|
||||
@@ -3578,9 +3555,8 @@ class Cases
|
||||
private function codeScannerReview(CodeScanner $cs, $code, $triTitle)
|
||||
{
|
||||
$foundDisabledCode = "";
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=") &&
|
||||
in_array('trigger', $cs->getScope())) {
|
||||
|
||||
if (in_array('trigger', $cs->getScope())) {
|
||||
//Check disabled code
|
||||
$arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $code);
|
||||
|
||||
@@ -3593,7 +3569,6 @@ class Cases
|
||||
$foundDisabledCode .= "<br />- " . $triTitle . ": " . $codeAndLine;
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
return $foundDisabledCode;
|
||||
}
|
||||
@@ -4170,7 +4145,6 @@ class Cases
|
||||
/** Execute the trigger */
|
||||
$this->getExecuteTriggerProcess($appUid, 'PAUSED');
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$threadTitle = Delegation::getDeltitle($appNumber, $index);
|
||||
$data = [
|
||||
'APP_UID' => $appUid,
|
||||
@@ -4182,7 +4156,6 @@ class Cases
|
||||
$data = array_merge($fields, $data);
|
||||
$listPaused = new ListPaused();
|
||||
$listPaused->create($data);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4292,11 +4265,9 @@ class Cases
|
||||
|
||||
$this->getExecuteTriggerProcess($appUid, "UNPAUSE");
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$row = array_merge($delRow, $row);
|
||||
$listPaused = new ListPaused();
|
||||
$listPaused->remove($appUid, $index, $row);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4347,7 +4318,6 @@ class Cases
|
||||
/** Execute a trigger when a case is cancelled */
|
||||
$this->getExecuteTriggerProcess($appUid, 'CANCELED', $executeSameCase);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$dataList = [
|
||||
'APP_UID' => $appUid,
|
||||
'DEL_INDEX' => $value['DEL_INDEX'],
|
||||
@@ -4359,7 +4329,6 @@ class Cases
|
||||
$listCanceled = new ListCanceled();
|
||||
// This action requires interaction with IndicatorsCalculator class
|
||||
$listCanceled->create($dataList);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4378,11 +4347,9 @@ class Cases
|
||||
|
||||
/** Close all the threads in APP_DELEGATION and APP_THREAD */
|
||||
if (is_null($delIndex)) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$result = $delegation->LoadParallel($appUid);
|
||||
$this->closeAllDelegations($appUid);
|
||||
$this->closeAllThreads($appUid);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
} else {
|
||||
/** Close the specific delIndex in APP_DELEGATION and APP_THREAD */
|
||||
@@ -4655,7 +4622,6 @@ class Cases
|
||||
//Execute trigger
|
||||
$this->getExecuteTriggerProcess($appUid, 'REASSIGNED');
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$participated = new ListParticipatedLast();
|
||||
$participated->remove($newData['APP_UID'], $newUserUid, $delIndex);
|
||||
|
||||
@@ -4674,7 +4640,6 @@ class Cases
|
||||
$criteriaSet = new Criteria("workflow");
|
||||
$criteriaSet->add(ListInboxPeer::DEL_INDEX, $newData['DEL_INDEX']);
|
||||
BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection("workflow"));
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Delete record of the table LIST_UNASSIGNED
|
||||
$unassigned = new ListUnassigned();
|
||||
@@ -5972,9 +5937,7 @@ class Cases
|
||||
$resultAttachments = array_merge($resultAttachments, $listAttachment);
|
||||
|
||||
$resultCaseNotes = 1;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$resultSummary = 1;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Message History
|
||||
$listMessage = $objectPermission->objectPermissionMessage(
|
||||
@@ -6034,11 +5997,9 @@ class Cases
|
||||
case 'CASES_NOTES':
|
||||
$resultCaseNotes = 1;
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
case 'SUMMARY_FORM':
|
||||
$resultSummary = 1;
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
case 'MSGS_HISTORY':
|
||||
$listMessage = $objectPermission->objectPermissionMessage(
|
||||
$appUid,
|
||||
@@ -6052,12 +6013,10 @@ class Cases
|
||||
);
|
||||
$resultMessages = array_merge($resultMessages, $listMessage);
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
case 'REASSIGN_MY_CASES':
|
||||
$listReassign = $objectPermission->objectPermissionByReassignCases($appUid, $proUid, $tasUid);
|
||||
$resultReassignCases = array_merge($resultReassignCases, $listReassign);
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6069,10 +6028,8 @@ class Cases
|
||||
"OUTPUT_DOCUMENTS" => $resultOutputs,
|
||||
"CASES_NOTES" => $resultCaseNotes,
|
||||
"MSGS_HISTORY" => $resultMessages
|
||||
/*----------------------------------********---------------------------------*/
|
||||
, "REASSIGN_MY_CASES" => $resultReassignCases
|
||||
, "SUMMARY_FORM" => $resultSummary
|
||||
/*----------------------------------********---------------------------------*/
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -806,7 +806,6 @@ class Derivation
|
||||
*/
|
||||
private function updateList(array $arrayCurrentDelegationData, array $arrayNextDelegationData, $taskNextDelegation, array $arrayApplicationData, $delIndexNew, $aSp, $removeList)
|
||||
{
|
||||
/*----------------------------------********---------------------------------*/
|
||||
try {
|
||||
if ($arrayNextDelegationData["TAS_UID"] != "-1") {
|
||||
$regexpTaskTypeToExclude = "WEBENTRYEVENT|END-MESSAGE-EVENT|START-MESSAGE-EVENT|INTERMEDIATE-THROW-MESSAGE-EVENT|INTERMEDIATE-CATCH-MESSAGE-EVENT|SCRIPT-TASK|INTERMEDIATE-CATCH-TIMER-EVENT";
|
||||
@@ -838,7 +837,6 @@ class Derivation
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1586,10 +1584,8 @@ class Derivation
|
||||
$parentCase['APP_DATA'] = array_merge($parentCase['APP_DATA'], $newFields);
|
||||
$case->updateCase($subApplication['APP_PARENT'], $parentCase);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$inbox = new ListInbox();
|
||||
$inbox->update($parentCase);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Update table SUB_APPLICATION
|
||||
$newSubApplication = new SubApplication();
|
||||
|
||||
@@ -334,7 +334,7 @@ class PMLicensedFeatures
|
||||
}
|
||||
return self::$instancefeature;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
public function verifyfeature ($featureName)
|
||||
{
|
||||
$cached = Cache::get(PmLicenseManager::CACHE_KEY . '.' . config("system.workspace"), []);
|
||||
@@ -492,5 +492,4 @@ class PMLicensedFeatures
|
||||
}
|
||||
return array_merge($data, $newData);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
@@ -804,9 +804,7 @@ class ProcessMap
|
||||
$oCriteria->addSelectColumn(StepTriggerPeer::TRI_UID);
|
||||
$oCriteria->addAsColumn('TRI_LOCATE_WEBBOT_PARAM', '(SELECT LOCATE(MD5(' . TriggersPeer::TRI_WEBBOT . '),' . TriggersPeer::TRI_PARAM . ') FROM ' . TriggersPeer::TABLE_NAME . ' WHERE ' . TriggersPeer::TRI_UID . '=' . StepTriggerPeer::TRI_UID . ' )');
|
||||
$oCriteria->addSelectColumn(StepTriggerPeer::ST_TYPE);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$oCriteria->addSelectColumn('IF (' . StepTriggerPeer::ST_CONDITION . ' = \'\', \'' . $imgNoEx . '\', \'' . $imgEx . '\') AS CONDITION_SET');
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$oCriteria->addSelectColumn(StepTriggerPeer::ST_POSITION);
|
||||
$oCriteria->addSelectColumn(TriggersPeer::TRI_TITLE);
|
||||
$oCriteria->addJoin(StepTriggerPeer::TRI_UID, TriggersPeer::TRI_UID, Criteria::LEFT_JOIN);
|
||||
@@ -3320,12 +3318,10 @@ class ProcessMap
|
||||
$sObjectType = G::LoadTranslation('MSGS_HISTORY');
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
case 'SUMMARY_FORM':
|
||||
$sObjectType = G::LoadTranslation('ID_SUMMARY_FORM');
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
default:
|
||||
$sObjectType = G::LoadTranslation('ID_ALL');
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
|
||||
@@ -6411,12 +6411,6 @@ class Processes
|
||||
try {
|
||||
$arrayDisabledCode = [];
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (!PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=")) {
|
||||
//Return
|
||||
return $arrayDisabledCode;
|
||||
}
|
||||
|
||||
//Set variables
|
||||
$cs = new CodeScanner((!is_null($workspaceName))? $workspaceName : config("system.workspace"));
|
||||
|
||||
@@ -6480,7 +6474,6 @@ class Processes
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Return
|
||||
return $arrayDisabledCode;
|
||||
|
||||
@@ -4,9 +4,7 @@ use Illuminate\Database\QueryException;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use ProcessMaker\BusinessModel\Process as BmProcess;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
use ProcessMaker\ChangeLog\ChangeLog;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
use ProcessMaker\BusinessModel\TaskSchedulerBM;
|
||||
use ProcessMaker\BusinessModel\WebEntry;
|
||||
use ProcessMaker\Core\Installer;
|
||||
@@ -328,12 +326,10 @@ class WorkspaceTools
|
||||
$this->clearDynContentHistoryData(false, $keepDynContent);
|
||||
CLI::logging("* End cleaning DYN_CONTENT in APP_HISTORY...(Completed on " . (microtime(true) - $start) . " seconds)\n");
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
CLI::logging("* Start migrating history data...\n");
|
||||
$start = microtime(true);
|
||||
$this->migrateAppHistoryToAppDataChangeLog(true);
|
||||
CLI::logging("* End migrating history data...(Completed on " . (microtime(true) - $start) . " seconds)\n");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
CLI::logging("* Start migrating and populating indexing for avoiding the use of table APP_CACHE_VIEW...\n");
|
||||
$start = microtime(true);
|
||||
@@ -1135,9 +1131,7 @@ class WorkspaceTools
|
||||
$this->checkSchedulerTable();
|
||||
$this->checkSequenceNumber();
|
||||
$this->migrateIteeToDummytask($this->name);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$this->upgradeAuditLog($this->name);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//There records in table "EMAIL_SERVER"
|
||||
$criteria = new Criteria("workflow");
|
||||
@@ -1437,13 +1431,9 @@ class WorkspaceTools
|
||||
if (file_exists(PATH_CORE . 'data' . PATH_SEP . 'check.data')) {
|
||||
$checkData = unserialize(file_get_contents(PATH_CORE . 'data' . PATH_SEP . 'check.data'));
|
||||
if (is_array($checkData)) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
$checkData = $licensedFeatures->addNewFeatures($checkData);
|
||||
|
||||
$catalog = new Catalog();
|
||||
$checkData = $catalog->registerRows($checkData);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
foreach ($checkData as $checkThis) {
|
||||
$this->updateThisRegistry($checkThis);
|
||||
}
|
||||
@@ -2257,12 +2247,10 @@ class WorkspaceTools
|
||||
$workspace->clearDynContentHistoryData(false, $keepDynContent);
|
||||
CLI::logging("* End cleaning DYN_CONTENT in APP_HISTORY...(Completed on " . (microtime(true) - $start) . " seconds)\n");
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
CLI::logging("* Start migrating history data...\n");
|
||||
$start = microtime(true);
|
||||
$workspace->migrateAppHistoryToAppDataChangeLog(false);
|
||||
CLI::logging("* End migrating history data...(Completed on " . (microtime(true) - $start) . " seconds)\n");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
CLI::logging("* Start migrating and populating indexing for avoiding the use of table APP_CACHE_VIEW...\n");
|
||||
$start = microtime(true);
|
||||
@@ -2472,14 +2460,9 @@ class WorkspaceTools
|
||||
public function changeHashPassword($workspace, $response)
|
||||
{
|
||||
$this->initPropel(true);
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($licensedFeatures->verifyfeature('95OY24wcXpEMzIyRmlNSnF0STNFSHJzMG9wYTJKekpLNmY2ZmRCeGtuZk5oUDloaUNhUGVjTDJBPT0=')) {
|
||||
EnterpriseClass::setHashPassword($response);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
EnterpriseClass::setHashPassword($response);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4446,7 +4429,6 @@ class WorkspaceTools
|
||||
$con->commit();
|
||||
|
||||
// Populating TAS.TAS_TITLE with BPMN_EVENT.EVN_NAME
|
||||
/*----------------------------------********---------------------------------*/
|
||||
CLI::logging("-> Populating TASK.TAS_TITLE with BPMN_EVENT.EVN_NAME\n");
|
||||
$con->begin();
|
||||
$rs = $stmt->executeQuery("UPDATE TASK
|
||||
@@ -4465,7 +4447,6 @@ class WorkspaceTools
|
||||
)
|
||||
AND EVENT.EVN_NAME != ''");
|
||||
$con->commit();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
// Populating PRO_ID, USR_ID IN LIST TABLES
|
||||
CLI::logging("-> Populating PRO_ID, USR_ID at LIST_* \n");
|
||||
@@ -4836,7 +4817,6 @@ class WorkspaceTools
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
/**
|
||||
* Migrate the contents of table APP_HISTORY to table APP_DATA_CHANGE_LOG.
|
||||
*
|
||||
@@ -4963,7 +4943,6 @@ class WorkspaceTools
|
||||
$conf->aConfig = ['updated' => true];
|
||||
$conf->saveConfig('MIGRATED_APP_HISTORY', 'history');
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
/**
|
||||
* Upgrade APP_ASSIGN_SELF_SERVICE_VALUE_GROUP and GROUP_USER tables.
|
||||
|
||||
@@ -5,9 +5,7 @@ use Illuminate\Support\Facades\Crypt;
|
||||
use ProcessMaker\BusinessModel\Cases as BmCases;
|
||||
use ProcessMaker\BusinessModel\Cases\Unassigned;
|
||||
use ProcessMaker\BusinessModel\EmailServer;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
use ProcessMaker\ChangeLog\ChangeLog;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
use ProcessMaker\Core\JobsManager;
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Model\Application;
|
||||
@@ -908,7 +906,6 @@ class WsBase
|
||||
try {
|
||||
$setup = [];
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (!empty($config)) {
|
||||
$arrayConfigAux = [];
|
||||
|
||||
@@ -946,11 +943,8 @@ class WsBase
|
||||
unset($setup['SMTPSECURE']);
|
||||
}
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$setup = System::getEmailConfiguration();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$msgError = "";
|
||||
if (sizeof($setup) == 0) {
|
||||
@@ -2342,7 +2336,6 @@ class WsBase
|
||||
//We need to update the variable $appData for use the new variables in the next trigger
|
||||
$appData = array_merge($appData, $appFields['APP_DATA']);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
ChangeLog::getChangeLog()
|
||||
->setDate('now')
|
||||
->setAppNumber($appData['APP_NUMBER'])
|
||||
@@ -2352,7 +2345,6 @@ class WsBase
|
||||
->setData(serialize($appData))
|
||||
->getExecutedAtIdByTriggerType($triggerType)
|
||||
->getObjectIdByUidAndObjType($stepUidObj, $stepType);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
return $varTriggers;
|
||||
}
|
||||
@@ -3228,13 +3220,11 @@ class WsBase
|
||||
|
||||
/** If those parameters are null we will to force the cancelCase */
|
||||
if (is_null($delIndex) && is_null($userUid)) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$case->cancelCase($caseUid, null, null, $this->getFlagSameCase());
|
||||
$result = self::messageExecuteSuccessfully();
|
||||
$g->sessionVarRestore();
|
||||
|
||||
return $result;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
/** We will to continue with review the threads */
|
||||
|
||||
@@ -1777,7 +1777,6 @@ class AppCacheView extends BaseAppCacheView
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
public function fillReportByUser ($dateInit, $dateFinish)
|
||||
{
|
||||
$con = Propel::getConnection("workflow");
|
||||
@@ -1823,6 +1822,5 @@ class AppCacheView extends BaseAppCacheView
|
||||
$stmt->executeQuery($val);
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
|
||||
@@ -267,13 +267,9 @@ class AppDelegation extends BaseAppDelegation
|
||||
$data->PREVIOUS_USR_UID = ($arrayAppDelegationPrevious !== false)? $arrayAppDelegationPrevious['USR_UID'] : $delPreviusUsrUid;
|
||||
|
||||
if ($bpmn->exists($proUid)) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
// this section evaluates the actions by email trigger execution please
|
||||
// modify this section carefully, the if evaluation checks if the license has been
|
||||
// activated in order to send the mail according to the configuration table
|
||||
if (PMLicensedFeatures
|
||||
::getSingleton()
|
||||
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
|
||||
$criteriaAbe = new Criteria();
|
||||
$criteriaAbe->add(AbeConfigurationPeer::PRO_UID, $proUid);
|
||||
$criteriaAbe->add(AbeConfigurationPeer::TAS_UID, $tasUid);
|
||||
@@ -288,13 +284,7 @@ class AppDelegation extends BaseAppDelegation
|
||||
$actionsByEmail->sendActionsByEmail($data, $dataAbe);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
|
||||
try {
|
||||
$pmGoogle = new PmGoogleApi();
|
||||
if ($pmGoogle->getServiceGmailStatus()) {
|
||||
@@ -304,8 +294,6 @@ class AppDelegation extends BaseAppDelegation
|
||||
} catch (Exception $oError) {
|
||||
error_log($oError->getMessage());
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
if ($flagActionsByEmail) {
|
||||
|
||||
@@ -42,12 +42,9 @@
|
||||
*/
|
||||
class AppDocument extends BaseAppDocument
|
||||
{
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
protected $driveDownload = array();
|
||||
protected $syncWithDrive = '';
|
||||
protected $syncPermissions = '';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
/*
|
||||
* Load the application document registry
|
||||
@@ -65,11 +62,9 @@ class AppDocument extends BaseAppDocument
|
||||
if (! is_null( $oAppDocument )) {
|
||||
$aFields = $oAppDocument->toArray( BasePeer::TYPE_FIELDNAME );
|
||||
$this->fromArray( $aFields, BasePeer::TYPE_FIELDNAME );
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$driveDownload = @unserialize($aFields['APP_DOC_DRIVE_DOWNLOAD']);
|
||||
$driveDownload = $driveDownload !== false ? $driveDownload : array();
|
||||
$oAppDocument->driveDownload = $driveDownload;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
return $aFields;
|
||||
} else {
|
||||
throw (new Exception( 'Error loading Document ' . $sAppDocUid . '/' . $iVersion . '. This row doesn\'t exist!' ));
|
||||
@@ -193,10 +188,8 @@ class AppDocument extends BaseAppDocument
|
||||
$docVersion ++;
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$aData['APP_DOC_DRIVE_DOWNLOAD'] = serialize($this->driveDownload);
|
||||
//$aData['SYNC_PERMISSIONS'] = $this->syncPermissions;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$oAppDocument->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||
$oAppDocument->setDocVersion( $docVersion );
|
||||
|
||||
@@ -245,7 +238,6 @@ class AppDocument extends BaseAppDocument
|
||||
$oAppDocument = AppDocumentPeer::retrieveByPK( $aData['APP_DOC_UID'], $aData['DOC_VERSION'] );
|
||||
|
||||
if (! is_null( $oAppDocument )) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$driveDownload = @unserialize($oAppDocument->getAppDocDriveDownload());
|
||||
if ($driveDownload !== false) {
|
||||
$aData['APP_DOC_DRIVE_DOWNLOAD'] = serialize(array_merge($driveDownload, $this->driveDownload));
|
||||
@@ -256,7 +248,6 @@ class AppDocument extends BaseAppDocument
|
||||
//$aData['SYNC_WITH_DRIVE'] = $this->syncWithDrive;
|
||||
//$oAppDocument->setSyncWithDrive($aData['SYNC_WITH_DRIVE']);
|
||||
//$oAppDocument->sync_with_drive = $aData['SYNC_WITH_DRIVE'];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$oAppDocument->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||
if ($oAppDocument->validate()) {
|
||||
$oConnection->begin();
|
||||
@@ -475,7 +466,6 @@ class AppDocument extends BaseAppDocument
|
||||
return true;
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
public function setDriveDownload($key, $value)
|
||||
{
|
||||
$this->driveDownload[$key] = $value;
|
||||
@@ -489,7 +479,6 @@ class AppDocument extends BaseAppDocument
|
||||
}
|
||||
return $url;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
public function getObject ($APP_UID, $DEL_INDEX, $STEP_UID_OBJ, $APP_DOC_TYPE)
|
||||
{
|
||||
|
||||
@@ -420,7 +420,6 @@ class Application extends BaseApplication
|
||||
return $this->getAppUid();
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
public function calculateAppDuration ($cron = 0)
|
||||
{
|
||||
try {
|
||||
@@ -524,6 +523,5 @@ class Application extends BaseApplication
|
||||
error_log( $oError->getMessage() );
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
|
||||
@@ -424,7 +424,7 @@ class ObjectPermission extends BaseObjectPermission
|
||||
public function objectPermissionByReassignCases($appUid, $proUid, $tasUid = '')
|
||||
{
|
||||
$result = [];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->addSelectColumn(ApplicationPeer::APP_UID);
|
||||
$criteria->add(ApplicationPeer::APP_UID, $appUid, Criteria::EQUAL);
|
||||
@@ -445,7 +445,6 @@ class ObjectPermission extends BaseObjectPermission
|
||||
$result[] = $row['APP_UID'];
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -506,12 +506,10 @@ class Task extends BaseTask
|
||||
//Populating attributes
|
||||
$this->setNew(false);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$indicator = new IndicatorsCalculator();
|
||||
$data = $indicator->suggestedTimeForTask($tasUid);
|
||||
$fields["TAS_AVERAGE"] = $data['average'];
|
||||
$fields["TAS_SDV"] = $data['sdv'];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
return $fields;
|
||||
} else {
|
||||
|
||||
@@ -511,14 +511,11 @@ class UsersProperties extends BaseUsersProperties
|
||||
$url = 'dashboard/main';
|
||||
}
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
case 'PM_STRATEGIC_DASHBOARD':
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=') && $RBAC->userCanAccess('PM_SETUP') == 1) {
|
||||
if ($RBAC->userCanAccess('PM_SETUP') == 1) {
|
||||
$url = 'strategicDashboard/main';
|
||||
}
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user