Upgrade PHP files
This commit is contained in:
@@ -122,25 +122,19 @@ try {
|
||||
spl_autoload_register(['Bootstrap', 'autoloadClass']);
|
||||
|
||||
//Set variables
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$dateInit = null;
|
||||
$dateFinish = null;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$argvx = '';
|
||||
|
||||
for ($i = 7; $i <= count($argv) - 1; $i++) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (strpos($argv[$i], '+init-date') !== false) {
|
||||
$dateInit = substr($argv[$i], 10);
|
||||
} elseif (strpos($argv[$i], '+finish-date') !== false) {
|
||||
$dateFinish = substr($argv[$i], 12);
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$argvx = $argvx . (($argvx != '') ? ' ' : '') . $argv[$i];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
global $sObject;
|
||||
$sObject = $workspace;
|
||||
@@ -321,11 +315,9 @@ try {
|
||||
if (empty($argvx) || strpos($argvx, "calculate") !== false) {
|
||||
$task->calculateDuration();
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (empty($argvx) || strpos($argvx, "calculateapp") !== false) {
|
||||
$task->calculateAppDuration();
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
executeEvents();
|
||||
executeScheduledCases();
|
||||
executeUpdateAppTitle();
|
||||
@@ -338,7 +330,6 @@ try {
|
||||
if (empty($argvx) || strpos($argvx, "plugins") !== false) {
|
||||
$task->executePlugins();
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (strpos($argvx, "report_by_user") !== false) {
|
||||
$task->fillReportByUser($dateInit, $dateFinish);
|
||||
}
|
||||
@@ -347,7 +338,6 @@ try {
|
||||
}
|
||||
synchronizeDrive();
|
||||
synchronizeGmailLabels();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
} catch (Exception $oError) {
|
||||
saveLog("main", "error", "Error processing workspace : " . $oError->getMessage() . "\n");
|
||||
}
|
||||
@@ -374,12 +364,10 @@ try {
|
||||
$task = new Task($asynchronous, $sObject);
|
||||
$task->webEntriesCron();
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
case 'actionsByEmailEmailResponse':
|
||||
$task = new Task($asynchronous, $sObject);
|
||||
$task->actionsByEmailResponse();
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$token = strtotime("now");
|
||||
@@ -586,7 +574,6 @@ function setExecutionResultMessage($m, $t = '')
|
||||
|
||||
eprintln("[$m]", $c);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
function synchronizeDrive()
|
||||
{
|
||||
@@ -644,4 +631,3 @@ function synchronizeGmailLabels()
|
||||
saveLog("synchronizeGmailLabels", "error", "Error when synchronizing Gmail labels: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
CLI::taskName('change-password-hash-method');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Change password hash method to md5 or sha256 for the specified workspace
|
||||
@@ -9,7 +8,6 @@ EOT
|
||||
CLI::taskArg('workspace', false);
|
||||
CLI::taskArg('hash', false);
|
||||
CLI::taskRun("change_hash");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
function run_addon_core_install($args)
|
||||
{
|
||||
@@ -53,7 +51,7 @@ function run_addon_core_install($args)
|
||||
$addon->setState("error");
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
function change_hash($command, $opts)
|
||||
{
|
||||
if (count($command) < 2) {
|
||||
@@ -91,4 +89,3 @@ function change_hash($command, $opts)
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
@@ -9,11 +9,8 @@ CLI::taskOpt('child', "Used by the main upgrade thread", 'child', 'child');
|
||||
CLI::taskOpt('buildACV', 'If this option is enabled, the Cache View is built.', 'ACV', 'buildACV');
|
||||
CLI::taskOpt('noxml', 'If this option is enabled, the XML files translation is not built.', 'NoXml', 'no-xml');
|
||||
CLI::taskOpt('nomafe', 'If this option is enabled, the MAFE files translation is not built.', 'nomafe', 'no-mafe');
|
||||
/*----------------------------------********---------------------------------*/
|
||||
CLI::taskOpt('keep_dyn_content', "Include the DYN_CONTENT_HISTORY value. Ex: --keep_dyn_content", 'i', 'keep_dyn_content');
|
||||
/*----------------------------------********---------------------------------*/
|
||||
CLI::taskRun("run_upgrade");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
CLI::taskName('unify-database');
|
||||
CLI::taskDescription(
|
||||
@@ -31,11 +28,9 @@ CLI::taskDescription(
|
||||
of ProcessMaker.
|
||||
EOT
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
CLI::taskArg('workspace');
|
||||
/*----------------------------------********---------------------------------*/
|
||||
CLI::taskRun("run_unify_database");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
CLI::taskName('upgrade-query');
|
||||
CLI::taskRun('runUpgradeQuery');
|
||||
|
||||
@@ -52,10 +47,7 @@ function run_upgrade($parameters, $args)
|
||||
$mainThread = $printHF = !array_key_exists('child', $args);
|
||||
$updateXmlForms = !array_key_exists('noxml', $args);
|
||||
$updateMafe = !array_key_exists('nomafe', $args);
|
||||
$keepDynContent = false;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$keepDynContent = array_key_exists('keep_dyn_content', $args); //In community version this section will be removed
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$keepDynContent = array_key_exists('keep_dyn_content', $args);
|
||||
|
||||
// Initializing variables
|
||||
$globalStartTime = microtime(true);
|
||||
@@ -199,7 +191,6 @@ function run_upgrade($parameters, $args)
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
function run_unify_database($args)
|
||||
{
|
||||
$workspaces = array();
|
||||
@@ -305,7 +296,6 @@ function run_unify_database($args)
|
||||
}
|
||||
$flag = G::isPMUnderUpdating(0);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
/**
|
||||
* Execute a query, used internally for upgrade process
|
||||
|
||||
@@ -180,7 +180,6 @@ EOT
|
||||
CLI::taskArg('workspace', true, true);
|
||||
CLI::taskRun("run_migrate_itee_to_dummytask");
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
CLI::taskName("check-workspace-disabled-code");
|
||||
CLI::taskDescription(<<<EOT
|
||||
Check disabled code for the specified workspace(s).
|
||||
@@ -219,7 +218,6 @@ EOT
|
||||
);
|
||||
CLI::taskArg('workspace', true, true);
|
||||
CLI::taskRun("run_migrate_list_unassigned");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
CLI::taskName('migrate-indexing-acv');
|
||||
CLI::taskDescription(<<<EOT
|
||||
@@ -313,7 +311,6 @@ EOT
|
||||
CLI::taskArg('workspace');
|
||||
CLI::taskRun("regenerate_pmtable_classes");
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
/**
|
||||
* Migrate the data from APP_HISTORY table to the new table APP_DATA_CHANGE_LOG.
|
||||
*/
|
||||
@@ -324,7 +321,6 @@ EOT
|
||||
);
|
||||
CLI::taskArg('workspace');
|
||||
CLI::taskRun('migrate_history_data');
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
/**
|
||||
* Remove the DYN_CONTENT_HISTORY
|
||||
@@ -895,9 +891,7 @@ function run_workspace_restore($args, $opts)
|
||||
$lang = array_key_exists("lang", $opts) ? $opts['lang'] : 'en';
|
||||
$port = array_key_exists("port", $opts) ? $opts['port'] : '';
|
||||
$optionMigrateHistoryData = [
|
||||
/*----------------------------------********---------------------------------*/
|
||||
'keepDynContent' => array_key_exists('keep_dyn_content', $args)
|
||||
/*----------------------------------********---------------------------------*/
|
||||
];
|
||||
if ($info) {
|
||||
WorkspaceTools::getBackupInfo($filename);
|
||||
@@ -1031,7 +1025,6 @@ function run_migrate_itee_to_dummytask($args, $opts)
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
/**
|
||||
* Check if we need to execute an external program for each workspace
|
||||
@@ -1167,7 +1160,6 @@ function migrate_list_unassigned($command, $args)
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
/**
|
||||
* Check if we need to execute an external program for each workspace
|
||||
@@ -1300,7 +1292,6 @@ function regenerate_pmtable_classes($args, $opts)
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
/**
|
||||
* This method migrates data from APP_HISTORY table to APP_DATA_CHANGE_LOG table.
|
||||
*
|
||||
@@ -1327,7 +1318,6 @@ function migrate_history_data($args, $opts)
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
/**
|
||||
* Will be clean the History of use from the table
|
||||
|
||||
@@ -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;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -736,14 +736,12 @@ class InstallerModule extends Controller
|
||||
$this->installLog(G::LoadTranslation('ID_CREATING', SYS_LANG, [$db_file]));
|
||||
file_put_contents($db_file, $dbText);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
//Generate the env.ini file
|
||||
$envIniFile = $path_site . 'env.ini';
|
||||
$content = 'system_utc_time_zone = 1' . "\n";
|
||||
|
||||
$this->installLog(G::LoadTranslation('ID_CREATING', SYS_LANG, [$envIniFile]));
|
||||
file_put_contents($envIniFile, $content);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Generate the databases.php file
|
||||
$databases_file = $path_site . 'databases.php';
|
||||
|
||||
@@ -271,10 +271,7 @@ class Admin extends Controller
|
||||
|
||||
$properties = array ();
|
||||
$ee = '';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
// In the community version this text must not be presented
|
||||
$ee = ' - Enterprise Edition';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$systemName = 'ProcessMaker';
|
||||
if (defined('SYSTEM_NAME')) {
|
||||
$systemName = SYSTEM_NAME;
|
||||
|
||||
@@ -41,26 +41,14 @@ class Designer extends Controller
|
||||
|
||||
$clientToken = $this->getCredentials($httpData);
|
||||
$debug = false; //System::isDebugMode();
|
||||
$consolidated = 0;
|
||||
$consolidated = 1;
|
||||
$enterprise = 0;
|
||||
$distribution = 0;
|
||||
$distribution = 1;
|
||||
|
||||
$usrUid = (isset($RBAC->userObj)) ? $RBAC->userObj->getUsrUid() : '';
|
||||
|
||||
$userProperties = UsersPropertiesPeer::retrieveByPk($usrUid);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) {
|
||||
$consolidated = 1;
|
||||
}
|
||||
$enterprise = 1;
|
||||
|
||||
if ($licensedFeatures->verifyfeature("Jb0N3dSZHVhZ1JNOEFZaElqdm15Y050Wmh5S0FEVEI0ckQ=")) {
|
||||
$distribution = 1;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$this->setVar('prj_uid', htmlspecialchars($proUid));
|
||||
$this->setVar('app_uid', htmlspecialchars($appUid));
|
||||
$this->setVar('consolidated', $consolidated);
|
||||
|
||||
@@ -482,8 +482,7 @@ class Home extends Controller
|
||||
$dataList['category'] = $category;
|
||||
$dataList['action'] = $type;
|
||||
$dataList['dir'] = 'DESC';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
|
||||
//In enterprise version this block of code should always be executed
|
||||
//In community version this block of code is deleted and is executed the other
|
||||
$listType = '';
|
||||
@@ -512,16 +511,6 @@ class Home extends Controller
|
||||
$list = new \ProcessMaker\BusinessModel\Lists();
|
||||
$cases = $list->getList($listType, $dataList);
|
||||
}
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||
$cases = $case->getList($dataList);
|
||||
foreach ($cases['data'] as &$value) {
|
||||
$value = array_change_key_case($value, CASE_UPPER);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
if (empty($cases) && $type == 'search') {
|
||||
|
||||
@@ -722,10 +722,7 @@ class Main extends Controller
|
||||
|
||||
$properties = array ();
|
||||
$ee = '';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
// In the community version this text must not be presented
|
||||
$ee = ' - Enterprise Edition';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$systemName = 'ProcessMaker';
|
||||
if (defined('SYSTEM_NAME')) {
|
||||
$systemName = SYSTEM_NAME;
|
||||
|
||||
@@ -38,17 +38,12 @@ G::LoadTranslation('ID_NEW_CASE'),
|
||||
''
|
||||
);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'CONSOLIDATED_CASES',
|
||||
'casesConsolidatedListExtJs?action=consolidated',
|
||||
G::LoadTranslation('ID_BATCH_ROUTING'),
|
||||
''
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'CASES_INBOX',
|
||||
|
||||
@@ -51,17 +51,14 @@ $G_TMP_MENU->AddIdRawOption(
|
||||
|
||||
// Supervisor Tasks section
|
||||
$G_TMP_MENU->AddIdRawOption('ADMIN', '', G::LoadTranslation('ID_SUPERVISOR_TASKS'), '', '', 'blockHeader');
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) {
|
||||
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'CONSOLIDATED_CASES',
|
||||
'casesConsolidatedListExtJs?action=consolidated',
|
||||
G::LoadTranslation('ID_BATCH_ROUTING'),
|
||||
'fas fa-bars'
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1 || $RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'CASES_TO_REASSIGN',
|
||||
|
||||
@@ -23,14 +23,9 @@ if ($RBAC->userCanAccess('PM_DASHBOARD') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption('DASHBOARD', 'dashboard/main', G::LoadTranslation('ID_DASHBOARD'), '', '', '', 'x-pm-dashboard');
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($RBAC->userCanAccess('PM_DASHBOARD') == 1) {
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) {
|
||||
$G_TMP_MENU->AddIdRawOption('DASHBOARD+', 'strategicDashboard/main', G::LoadTranslation('ID_STRATEGIC_DASHBOARD'), '', '', '', 'x-pm-dashboard');
|
||||
}
|
||||
$G_TMP_MENU->AddIdRawOption('DASHBOARD+', 'strategicDashboard/main', G::LoadTranslation('ID_STRATEGIC_DASHBOARD'), '', '', '', 'x-pm-dashboard');
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
// ADMIN MODULE
|
||||
if ($RBAC->userCanAccess('PM_SETUP') == 1 || $RBAC->userCanAccess('PM_USERS') == 1) {
|
||||
|
||||
@@ -6,11 +6,9 @@ global $G_TMP_MENU;
|
||||
global $RBAC;
|
||||
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$conf = new Configurations();
|
||||
$sAudit = $conf->getConfiguration('AUDIT_LOG', 'log');
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
$pmSetupPermission = true;
|
||||
if ($RBAC->userCanAccess('PM_SETUP_LOGO') === 1) {
|
||||
@@ -124,7 +122,6 @@ if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
'',
|
||||
'settings'
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'STRATEGIC_DASHBOARD',
|
||||
@@ -145,7 +142,6 @@ if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
'settings'
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
}
|
||||
//tools options
|
||||
@@ -194,7 +190,6 @@ if ($RBAC->userCanAccess('PM_USERS') === 1) {
|
||||
'',
|
||||
'users'
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'USERS_EXTENDED',
|
||||
'../userExtendedAttributes/index',
|
||||
@@ -203,7 +198,6 @@ if ($RBAC->userCanAccess('PM_USERS') === 1) {
|
||||
'',
|
||||
'users'
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'GROUPS',
|
||||
'../groups/groups',
|
||||
@@ -300,10 +294,7 @@ if ($RBAC->userCanAccess('PM_SETUP') === 1 && $RBAC->userCanAccess('PM_SETUP_LOG
|
||||
'',
|
||||
'logs'
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (isset($sAudit) && $sAudit !== false && $licensedFeatures->verifyfeature
|
||||
('vtSeHNhT0JnSmo1bTluUVlTYUxUbUFSVStEeXVqc1pEUG5EeXc0MGd2Q3ErYz0=')
|
||||
) {
|
||||
if (isset($sAudit) && $sAudit !== false) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'AUDIT_LOG',
|
||||
'../setup/auditLog',
|
||||
@@ -313,10 +304,8 @@ if ($RBAC->userCanAccess('PM_SETUP') === 1 && $RBAC->userCanAccess('PM_SETUP_LOG
|
||||
'logs'
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($RBAC->userCanAccess('PM_SETUP_LOG_FILES') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'STANDARD_LOGGING',
|
||||
@@ -327,8 +316,6 @@ if ($RBAC->userCanAccess('PM_SETUP_LOG_FILES') === 1) {
|
||||
'logs'
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
@@ -347,8 +334,6 @@ if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
'',
|
||||
'settings'
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($licensedFeatures->verifyfeature('vtSeHNhT0JnSmo1bTluUVlTYUxUbUFSVStEeXVqc1pEUG5EeXc0MGd2Q3ErYz0=')) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'AUDIT_LOG',
|
||||
'auditLogConfig',
|
||||
@@ -357,10 +342,8 @@ if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
'',
|
||||
'settings'
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if (!file_exists(PATH_DATA_SITE . "plugin.singleton")) {
|
||||
require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php';
|
||||
$enterprise = new enterprisePlugin('enterprise');
|
||||
@@ -384,9 +367,8 @@ if ((isset($pmLicenseManagerO->plan)) && ($pmLicenseManagerO->plan != "")) {
|
||||
if ($licenseStatusInfo["message"] != "") {
|
||||
$licStatusMsg = " <font color=\"red\">(" . $licenseStatusInfo["message"] . ")</font>";
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP') == 1) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (
|
||||
$RBAC->userCanAccess('PM_SETUP_PLUGINS') === 1 &&
|
||||
$RBAC->userCanAccess('PM_SETUP_ADVANCE') === 1
|
||||
@@ -410,10 +392,8 @@ if ($RBAC->userCanAccess('PM_SETUP') == 1) {
|
||||
'settings'
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
$status = $pluginRegistry->getStatusPlugin('actionsByEmail');
|
||||
|
||||
@@ -430,7 +410,6 @@ if ((string) ($status) !== 'enabled' &&
|
||||
'logs'
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if ($RBAC->userCanAccess('PM_TASK_SCHEDULER_ADMIN') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
@@ -449,7 +428,6 @@ if ($RBAC->userCanAccess('PM_TASK_SCHEDULER_ADMIN') === 1) {
|
||||
'',
|
||||
G::LoadTranslation('ID_TASK_SCHEDULER')
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'ID_MENU_PLUGINS',
|
||||
'../scheduler/index?category=plugins',
|
||||
@@ -474,5 +452,4 @@ if ($RBAC->userCanAccess('PM_TASK_SCHEDULER_ADMIN') === 1) {
|
||||
'',
|
||||
G::LoadTranslation('ID_TASK_SCHEDULER')
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
@@ -205,11 +205,7 @@ try {
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature("sywN09PSzh1MVdOajZBdnhMbFhCSnpNT1lLTEFwVklmOTE=")) {
|
||||
$arr[] = array("sType" => "ldapAdvanced", "sLabel" => "ldapAdvanced");
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$arr[] = array("sType" => "ldapAdvanced", "sLabel" => "ldapAdvanced");
|
||||
|
||||
echo '{sources: ' . G::json_encode( $arr ) . '}';
|
||||
break;
|
||||
|
||||
@@ -38,15 +38,10 @@ $G_ID_MENU_SELECTED = 'USERS';
|
||||
$G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('authSources/authSourcesList', false); //adding a javascript file .js
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($licensedFeatures->verifyfeature('sywN09PSzh1MVdOajZBdnhMbFhCSnpNT1lLTEFwVklmOTE=')) {
|
||||
$oHeadPublisher->addExtJsScript('authSources/authSourcesListSyn', false); //adding a javascript file .js
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$oHeadPublisher->addExtJsScript('authSources/authSourcesListSyn', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('authSources/authSourcesList'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('FORMATS', $c->getFormats());
|
||||
$oHeadPublisher->assign('CONFIG', $Config);
|
||||
|
||||
@@ -36,13 +36,7 @@ $G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
|
||||
$G_PUBLISH = new Publisher();
|
||||
$fields = $RBAC->getAuthSource($_GET['sUID']);
|
||||
if (file_exists(PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml')) {
|
||||
$pluginEnabled = 0;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('sywN09PSzh1MVdOajZBdnhMbFhCSnpNT1lLTEFwVklmOTE=')) {
|
||||
$pluginEnabled = 1;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$pluginEnabled = 1;
|
||||
if ($pluginEnabled == 0) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', array('MESSAGE' => G::LoadTranslation('ID_AUTH_SOURCE_FEATURE_MISSING') ));
|
||||
G::RenderPage('publish', 'blank');
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
use ProcessMaker\BusinessModel\Cases as BmCases;
|
||||
use ProcessMaker\BusinessModel\Cases\ChangeLog;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
use ProcessMaker\ChangeLog\ChangeLogResult;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
use ProcessMaker\Model\Task as ModelTask;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
use ProcessMaker\Util\DateTime;
|
||||
@@ -836,8 +834,6 @@ class Ajax
|
||||
$appUid = $idHistoryArray[1];
|
||||
$tasUid = $idHistoryArray[2];
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
//In enterprise version this snippet of code should be always be executed
|
||||
//In community version this snippet of code is deleted and is executed the next snippet of code
|
||||
$changeLog = new ChangeLogResult();
|
||||
@@ -847,15 +843,6 @@ class Ajax
|
||||
->setTasUid($tasUid)
|
||||
->getLogs();
|
||||
echo G::json_encode($result);
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$start = isset($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0;
|
||||
$limit = isset($_REQUEST['limit']) ? (int) $_REQUEST['limit'] : 15;
|
||||
$changeLog = new ChangeLog();
|
||||
echo G::json_encode($changeLog->getChangeLog($appUid, $proUid, $tasUid, $start, $limit));
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
public function changeLogTab()
|
||||
|
||||
@@ -15,9 +15,7 @@ unset($_SESSION['APPLICATION']);
|
||||
$action = isset($_GET['action']) ? $_GET['action'] : (isset($_POST['action']) ? $_POST['action'] : 'todo');
|
||||
$openApplicationUid = (isset($_GET['openApplicationUid']))? $_GET['openApplicationUid'] : null;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$filterAction = isset($_GET['filterAction']) ? $_GET['filterAction'] : (isset($_POST['filterAction']) ? $_POST['filterAction'] : '');
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//fix a previous inconsistency
|
||||
$urlProxy = 'proxyCasesList';
|
||||
@@ -25,7 +23,6 @@ if ($action == 'selfservice') {
|
||||
$action = 'unassigned';
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$urlProxy = 'proxyNewCasesList';
|
||||
switch ($action) {
|
||||
case 'todo':
|
||||
@@ -63,7 +60,6 @@ switch ($action) {
|
||||
$urlProxy .= '?list=inbox';
|
||||
break;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$headPublisher = headPublisher::getSingleton();
|
||||
|
||||
@@ -166,9 +162,6 @@ $headPublisher->assign('columnSearchValues', $columnToSearch); //Sending the lis
|
||||
$headPublisher->assign('filtersValues', $filters); //Sending filters defined
|
||||
$headPublisher->assign('workspace', config('system.workspace'));
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) {
|
||||
$taskStatus = getTaskStatus();
|
||||
$headPublisher->assign('filterStatus', $taskStatus);
|
||||
|
||||
@@ -180,8 +173,6 @@ if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjB
|
||||
setcookie("dashboardListInbox", '', time() + (24 * 60 * 60), "/sys" . config("system.workspace"), null, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
/** Define actions menu in the cases list */
|
||||
$reassignCase = ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1) ? 'true' : 'false';
|
||||
@@ -500,7 +491,6 @@ function getColumnsSearchArray()
|
||||
return $filters;
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
function getClientCredentials($clientId)
|
||||
{
|
||||
$oauthQuery = new ProcessMaker\Services\OAuth2\PmPdo(getDsn());
|
||||
@@ -540,4 +530,3 @@ function getAuthorizationCode($client)
|
||||
|
||||
return $code;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
<script>
|
||||
if (typeof window.parent != 'undefined') {
|
||||
<?php
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$pathDerivateGmail = 'derivatedGmail';
|
||||
$statusPMGmail = false;
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
|
||||
|
||||
$pmGoogle = new PmGoogleApi();
|
||||
$statusPMGmail = $pmGoogle->getServiceGmailStatus();
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if (isset($_GET['ux'])) {
|
||||
switch ($_GET['ux']) {
|
||||
case 'SIMPLIFIED':
|
||||
@@ -20,10 +17,8 @@ if (isset($_GET['ux'])) {
|
||||
default:
|
||||
$url = 'casesListExtJs';
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
} elseif ($statusPMGmail) {
|
||||
$url = $pathDerivateGmail;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
} else {
|
||||
$url = 'casesListExtJs';
|
||||
}
|
||||
@@ -32,13 +27,9 @@ if (isset($_GET['ux'])) {
|
||||
}
|
||||
echo ' parent.parent.postMessage("redirect=todo","*");';
|
||||
if (isset($_GET['ux'])) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09') && $statusPMGmail) {
|
||||
if ($statusPMGmail) {
|
||||
echo '} else { window.parent.location.href = \''.$pathDerivateGmail.'\'; }';
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
echo '} else {
|
||||
if (parent.parent.postMessage) {
|
||||
parent.parent.postMessage("redirect=todo","*");
|
||||
@@ -46,15 +37,6 @@ if (isset($_GET['ux'])) {
|
||||
window.parent.location.href = \'casesListExtJs\';
|
||||
}
|
||||
}';
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
echo '} else { parent.parent.postMessage("redirect=todo","*"); }';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
echo "try {parent.parent.updateCasesTree();parent.parent.highlightCasesTree();} catch(e) {}";
|
||||
?>
|
||||
|
||||
@@ -7,11 +7,9 @@ switch ($action) {
|
||||
case 'getAllCounters':
|
||||
getAllCounters();
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
case 'getAllCountersEnterprise':
|
||||
getAllCountersEnterprise();
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
default: //this is the starting call
|
||||
getLoadTreeMenuData();
|
||||
break;
|
||||
@@ -34,13 +32,11 @@ function getLoadTreeMenuData()
|
||||
$typesId['CASES_SELFSERVICE'] = 'selfservice';
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) {
|
||||
$typesId['CONSOLIDATED_CASES'] = 'batch_routing';
|
||||
$types[] = 'batch_routing';
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$list = [];
|
||||
$list['count'] = ' ';
|
||||
@@ -184,7 +180,6 @@ function getLoadTreeMenuData()
|
||||
die;
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
function getAllCountersEnterprise()
|
||||
{
|
||||
try {
|
||||
@@ -196,7 +191,6 @@ function getAllCountersEnterprise()
|
||||
throw (new Exception($e->getMessage()));
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
function getAllCounters()
|
||||
{
|
||||
|
||||
@@ -44,17 +44,13 @@ $delegation = $appDelegation->load($appUid, $delIndex);
|
||||
// if there are no user in the delegation row, this case is still in selfservice
|
||||
if ($delegation['USR_UID'] == "") {
|
||||
$case->setCatchUser($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED']);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
|
||||
|
||||
$pmGoogle = new PmGoogleApi();
|
||||
if ($pmGoogle->getServiceGmailStatus()) {
|
||||
$labGmail = new labelsGmail();
|
||||
$labGmail->addRelabelingToQueue($appUid, $delIndex, -1, true);
|
||||
}
|
||||
}
|
||||
|
||||
if ($licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) {
|
||||
$drive = new AppDocumentDrive();
|
||||
if ($drive->getStatusDrive()) {
|
||||
//add users email next task
|
||||
@@ -62,8 +58,7 @@ if ($delegation['USR_UID'] == "") {
|
||||
$userInfo = $user->load($_SESSION['USER_LOGGED']);
|
||||
$drive->addUsersDocumentDrive($appUid, [$userInfo['USR_EMAIL']]);
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//changing email labels if the claim comes from gmail
|
||||
if (array_key_exists('gmail', $_SESSION) && $_SESSION['gmail'] == 1) {
|
||||
die('<script type="text/javascript">
|
||||
|
||||
@@ -86,15 +86,11 @@ try {
|
||||
}
|
||||
|
||||
$flagGmail = false;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
|
||||
|
||||
$pmGoogle = new PmGoogleApi();
|
||||
if ($pmGoogle->getServiceGmailStatus()) {
|
||||
$flagGmail = true;
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$application = $_SESSION['APPLICATION'];
|
||||
$tasUid = $_SESSION['TASK'];
|
||||
|
||||
@@ -108,8 +108,7 @@ if (!$sw_file_exists) {
|
||||
$nameFile = $oAppDocument->Fields['APP_DOC_FILENAME'];
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
$downloadStatus = false;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) {
|
||||
|
||||
$drive = new AppDocumentDrive();
|
||||
if ($drive->getStatusDrive()) {
|
||||
$fieldDrive = $oAppDocument->getAppDocDriveDownload();
|
||||
@@ -126,8 +125,7 @@ if (!$sw_file_exists) {
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if (!$downloadStatus) {
|
||||
G::streamFile($realPath, $bDownload, $nameFile); //download
|
||||
}
|
||||
|
||||
@@ -118,8 +118,7 @@ if (!$sw_file_exists) {
|
||||
$nameFile = $info['basename'] . $ver . '.' . $ext;
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
$downloadStatus = false;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) {
|
||||
|
||||
$drive = new AppDocumentDrive();
|
||||
if ($drive->getStatusDrive()) {
|
||||
$fieldDrive = $oAppDocument->getAppDocDriveDownload();
|
||||
@@ -137,8 +136,7 @@ if (!$sw_file_exists) {
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if (!$downloadStatus) {
|
||||
G::streamFile($realPath, $download, $nameFile); //download
|
||||
}
|
||||
|
||||
@@ -113,10 +113,7 @@ if ($oServerConf->isRtl(SYS_LANG)) {
|
||||
$regionDebug = 'east';
|
||||
}
|
||||
|
||||
$urlProxy = 'casesMenuLoader?action=getAllCounters&r=';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$urlProxy = 'casesMenuLoader?action=getAllCountersEnterprise&r=';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$oHeadPublisher->assign('regionTreePanel', $regionTreePanel);
|
||||
$oHeadPublisher->assign('regionDebug', $regionDebug);
|
||||
@@ -126,19 +123,16 @@ $oHeadPublisher->assign('urlProxy', $urlProxy); //sending the urlProxy to make
|
||||
$oHeadPublisher->assign("_nodeId", isset($confDefaultOption) ? $confDefaultOption : "PM_USERS"); //User menu permissions
|
||||
$oHeadPublisher->assign("FORMATS", $conf->getFormats());
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
// If the feature for highlight the home folders is enabled, set some javascript variables
|
||||
if (HIGHLIGHT_HOME_FOLDER_ENABLE) {
|
||||
$oHeadPublisher->assign("highlightUrlProxy", "casesMenuHighlight?r=");
|
||||
$oHeadPublisher->assign("highlightRefreshTime", HIGHLIGHT_HOME_FOLDER_REFRESH_TIME);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$_SESSION["current_ux"] = "NORMAL";
|
||||
|
||||
G::RenderPage("publish", "extJs");
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
function getClientCredentials($clientId)
|
||||
{
|
||||
$oauthQuery = new ProcessMaker\Services\OAuth2\PmPdo(getDsn());
|
||||
@@ -174,4 +168,3 @@ function getAuthorizationCode($client)
|
||||
|
||||
return $code;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
@@ -57,16 +57,13 @@ $conf = new Configurations();
|
||||
$headPublisher = headPublisher::getSingleton();
|
||||
|
||||
$urlToRedirectAfterPause = 'casesListExtJs';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
|
||||
|
||||
$pmGoogle = new PmGoogleApi();
|
||||
if (array_key_exists('gmail', $_SESSION) && $_SESSION['gmail'] == 1 && $pmGoogle->getServiceGmailStatus()) {
|
||||
$_SESSION['gmail'] = 0;
|
||||
$urlToRedirectAfterPause = '/sys' . $_SESSION['WORKSPACE'] . '/en/neoclassic/cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=sent';
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
|
||||
$headPublisher->assign('urlToRedirectAfterPause', $urlToRedirectAfterPause);
|
||||
$headPublisher->addExtJsScript('app/main', true);
|
||||
@@ -147,7 +144,6 @@ $isBpmn = $fields['PRO_BPMN'] === 1 ? true : false;
|
||||
*/
|
||||
$showCustomForm = false;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$respView = $caseInstance->getAllObjectsFrom($case['PRO_UID'], $appUid, $case['TAS_UID'], $_SESSION['USER_LOGGED'], 'VIEW');
|
||||
$viewSummaryForm = isset($respView['SUMMARY_FORM']) && $respView['SUMMARY_FORM'] === 1 ? true : false;
|
||||
$isNoEmpty = isset($fields['PRO_DYNAFORMS']['PROCESS']) && !empty($fields['PRO_DYNAFORMS']['PROCESS']);
|
||||
@@ -155,7 +151,6 @@ $isNoEmpty = isset($fields['PRO_DYNAFORMS']['PROCESS']) && !empty($fields['PRO_D
|
||||
if ($isBpmn && $viewSummaryForm && $isNoEmpty) {
|
||||
$showCustomForm = true;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$pmDynaform = new PmDynaform();
|
||||
$step = new Step();
|
||||
|
||||
@@ -25,10 +25,8 @@ try {
|
||||
$viewSummaryForm = 0;
|
||||
$applicationFields = $case->loadCase( $_REQUEST['APP_UID'], $_REQUEST['DEL_INDEX'] );
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$respView = $case->getAllObjectsFrom( $applicationFields['PRO_UID'], $_REQUEST['APP_UID'], $applicationFields['TAS_UID'], $_SESSION['USER_LOGGED'], 'VIEW' );
|
||||
$viewSummaryForm = $respView['SUMMARY_FORM'];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Check if the user has the Process Permissions - Summary Form
|
||||
if ($viewSummaryForm == 0) {
|
||||
|
||||
@@ -29,9 +29,6 @@ $headPublisher->addContent("emailServer/emailServer"); //Adding a HTML file
|
||||
$headPublisher->addExtJsScript("emailServer/emailServer", false); //Adding a JavaScript file
|
||||
$headPublisher->assign("CONFIG", $arrayConfig);
|
||||
$headPublisher->assign("errorMessageIfNotAuthenticate", $messageSent);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$headPublisher->assign("EMAILSERVER_LICENSED", (PMLicensedFeatures::getSingleton()->verifyfeature("zIKRGpDM3pjcHFsWGplNDN0dTl5bGN3UTNiOWdQU0E5Q05QTksrU1ladWQ0VT0=")) ? 1 : 0);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$headPublisher->assign("EMAILSERVER_LICENSED", 1);
|
||||
|
||||
G::RenderPage("publish", "extJs");
|
||||
|
||||
@@ -44,7 +44,7 @@ try {
|
||||
//Spaces not supported at the end of passwords
|
||||
$pwd = rtrim($frm['USR_PASSWORD']);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php';
|
||||
|
||||
if (!file_exists(PATH_DATA_SITE . "plugin.singleton")) {
|
||||
@@ -52,7 +52,7 @@ try {
|
||||
$enterprise->enable();
|
||||
$enterprise->setup();
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
Cache::put('ldapMessageError', '', 120); //laravel 8.x the time parameter is in seconds.
|
||||
$uid = $RBAC->VerifyLogin($usr, $pwd);
|
||||
$ldapMessageError = Cache::pull('ldapMessageError');
|
||||
@@ -245,8 +245,6 @@ try {
|
||||
$_SESSION['USR_TIME_ZONE'] = $userTimeZone;
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature('oq3S29xemxEZXJpZEIzN01qenJUaStSekY4cTdJVm5vbWtVM0d4S2lJSS9qUT0=')) {
|
||||
if (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) {
|
||||
$dateTime = new \ProcessMaker\Util\DateTime();
|
||||
|
||||
@@ -257,8 +255,6 @@ try {
|
||||
$_SESSION['BROWSER_TIME_ZONE'] = $dateTime->getTimeZoneIdByTimeZoneOffset((int)$_POST['form']['BROWSER_TIME_ZONE_OFFSET'], false);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Set data
|
||||
$aUser = $RBAC->userObj->load($_SESSION['USER_LOGGED']);
|
||||
|
||||
@@ -58,8 +58,6 @@ try {
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature('oq3S29xemxEZXJpZEIzN01qenJUaStSekY4cTdJVm5vbWtVM0d4S2lJSS9qUT0=')) {
|
||||
if ((int)($arraySystemConfiguration['system_utc_time_zone'])) {
|
||||
$dateTime = new \ProcessMaker\Util\DateTime();
|
||||
|
||||
@@ -79,8 +77,7 @@ try {
|
||||
$_SESSION['BROWSER_TIME_ZONE'] = $dateTime->getTimeZoneIdByTimeZoneOffset((int)$_POST['form']['BROWSER_TIME_ZONE_OFFSET'], false);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$cookieOptions = Bootstrap::buildCookieOptions(['expires' => time() + (24 * 60 * 60)]);
|
||||
setcookie('singleSignOn', '1', $cookieOptions);
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ use Illuminate\Support\Facades\Cache;
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
//Browser Compatibility
|
||||
$browserSupported = G::checkBrowserCompatibility();
|
||||
if ($browserSupported==false) {
|
||||
@@ -12,7 +11,7 @@ if ($browserSupported==false) {
|
||||
G::SendTemporalMessage('ID_CURRENT_BROWSER_NOT_SUPPORTED', 'warning');
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$aFields = array();
|
||||
|
||||
//Validated redirect url
|
||||
@@ -120,9 +119,7 @@ if (isset($_SESSION['USER_LOGGED'])) {
|
||||
// Execute SSO trigger
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
if (defined('PM_SINGLE_SIGN_ON')) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('x4TTzlISnp2K2tnSTJoMC8rTDRMTjlhMCtZeXV0QnNCLzU=')) {
|
||||
|
||||
//Check in SSO class
|
||||
$oSso = new PmSsoClass();
|
||||
$res = $oSso->ssocVerifyUser();
|
||||
@@ -135,9 +132,7 @@ if (isset($_SESSION['USER_LOGGED'])) {
|
||||
require_once 'authentication.php';
|
||||
die();
|
||||
}
|
||||
//Check in SSO class
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if ($pluginRegistry->existsTrigger(PM_SINGLE_SIGN_ON)) {
|
||||
if ($pluginRegistry->executeTriggers(PM_SINGLE_SIGN_ON, null)) {
|
||||
// Start new session
|
||||
@@ -180,24 +175,6 @@ $_SESSION["USERNAME_PREVIOUS2"] = $usernamePrevious2;
|
||||
$_SESSION['NW_PASSWORD'] = $pass;
|
||||
$_SESSION['NW_PASSWORD2'] = $pass1;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$licenseManager = PmLicenseManager::getSingleton();
|
||||
if (in_array(G::encryptOld($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) {
|
||||
$G_PUBLISH = new Publisher();
|
||||
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));
|
||||
$version = isset($version[0]) ? intval($version[0]) : 0;
|
||||
if ($version >= 3) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/licenseExpiredpm3', '', array(), 'licenseUpdate');
|
||||
} else {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/licenseExpired', '', array(), 'licenseUpdate');
|
||||
}
|
||||
G::RenderPage('publish');
|
||||
die();
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//translation
|
||||
//$Translations = G::getModel("Translation");
|
||||
//require_once "classes/model/Translation.php";
|
||||
@@ -205,13 +182,8 @@ $Translations = new Translation();
|
||||
$translationsTable = $Translations->getTranslationEnvironments();
|
||||
|
||||
$availableLangArray = array();
|
||||
$availableLangArray [] = array('LANG_ID' => 'char', 'LANG_NAME' => 'char' );
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkdKR3ROS0VzWGdoLzNQYz0=')) {
|
||||
$availableLangArray [] = array('LANG_ID' => 'default', 'LANG_NAME' => G::LoadTranslation("ID_DEFAULT_LANGUAGE") );
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$availableLangArray [] = array('LANG_ID' => 'default', 'LANG_NAME' => G::LoadTranslation("ID_DEFAULT_LANGUAGE") );
|
||||
|
||||
foreach ($translationsTable as $locale) {
|
||||
$row['LANG_ID'] = $locale['LOCALE'];
|
||||
|
||||
@@ -231,13 +203,7 @@ $oConf = new Configurations();
|
||||
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
|
||||
|
||||
if (isset($oConf->aConfig["login_defaultLanguage"]) && $oConf->aConfig["login_defaultLanguage"] != "") {
|
||||
$aFields["USER_LANG"] = $oConf->aConfig["login_defaultLanguage"];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkdKR3ROS0VzWGdoLzNQYz0=')) {
|
||||
$aFields["USER_LANG"] = "default";
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$aFields["USER_LANG"] = "default";
|
||||
} else {
|
||||
$myUrl = explode("/", $_SERVER["REQUEST_URI"]);
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
use Illuminate\Support\Facades\Crypt;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
//Browser Compatibility
|
||||
$browserSupported = G::checkBrowserCompatibility();
|
||||
if ($browserSupported==false) {
|
||||
@@ -10,7 +9,7 @@ if ($browserSupported==false) {
|
||||
G::SendTemporalMessage('ID_CURRENT_BROWSER_NOT_SUPPORTED', 'warning');
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if (isset ($_POST['form']['USER_ENV'])) {
|
||||
$data = Crypt::encryptString(serialize($_POST));
|
||||
$url = sprintf('/sys%s/%s/%s/login/sysLoginVerify?d=%s', $_POST['form']['USER_ENV'], SYS_LANG, SYS_SKIN, $data);
|
||||
|
||||
@@ -32,15 +32,7 @@ $conf = new Configurations();
|
||||
|
||||
$pmVersion = (preg_match("/^([\d\.]+).*$/", System::getVersion(), $arrayMatch)) ? $arrayMatch[1] : ""; //Otherwise: Branch master
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
$arrayFlagImportFileExtension = array("pm", "pmx", "pmx2", "bpmn");
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$arrayFlagImportFileExtension = array("pm", "pmx", "bpmn");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$arrayFlagImportFileExtension = array("pm", "pmx", "pmx2", "bpmn");
|
||||
|
||||
$arrayFlagMenuNewOption = array("pm" => true, "bpmn" => true);
|
||||
|
||||
@@ -115,13 +107,8 @@ if (count($callBackFile)) {
|
||||
}
|
||||
$oHeadPublisher->assign("importProcessCallbackFile", $file);
|
||||
|
||||
$isGranularFeature = false;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('jXsSi94bkRUcVZyRStNVExlTXhEclVadGRRcG9xbjNvTWVFQUF3cklKQVBiVT0=')) {
|
||||
$isGranularFeature = true;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$isGranularFeature = true;
|
||||
|
||||
$oHeadPublisher->assign("isGranularFeature", $isGranularFeature);
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -30,15 +30,11 @@ try {
|
||||
if(empty($_GET)){
|
||||
$proUid = Bootstrap::json_decode( $_POST['data']);
|
||||
$_GET["pro_uid"] = $proUid->pro_uid;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$_GET["objects"] = (property_exists($proUid, 'objects'))? $proUid->objects : '';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
if (\BpmnProject::exists($_GET["pro_uid"]) && isset($_GET['objects'])) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$_GET["objects"] = \G::json_decode($_GET['objects']);
|
||||
if (empty($_GET['objects'])) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$exporter = new ProcessMaker\Exporter\XmlExporter($_GET["pro_uid"]);
|
||||
$projectName = $exporter->getProjectName();
|
||||
$getProjectName = $exporter->truncateName($projectName, false);
|
||||
@@ -46,13 +42,11 @@ try {
|
||||
$version = Common::getLastVersionSpecialCharacters($outputDir, $getProjectName, "pmx") + 1;
|
||||
$outputFilename = sprintf("%s-%s.%s", str_replace(" ", "_", $getProjectName), $version, "pmx");
|
||||
$outputFilename = $exporter->saveExport($outputDir . $outputFilename);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}else{
|
||||
$granularExporter = new \ProcessMaker\BusinessModel\Migrator\GranularExporter($_GET['pro_uid']);
|
||||
$outputFilename = $granularExporter->export($_GET['objects']);
|
||||
$projectName = $granularExporter->getProjectName();
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
G::auditLog('ExportProcess','Export process "' . $projectName . '"');
|
||||
} else {
|
||||
$oProcess = new Processes();
|
||||
|
||||
@@ -28,9 +28,8 @@ $objectsToImport = '';
|
||||
if (isset($_POST["PRO_FILENAME"])) {
|
||||
$_POST["PRO_FILENAME"] = htmlspecialchars_decode($_POST["PRO_FILENAME"]);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=") &&
|
||||
isset($_FILES["PROCESS_FILENAME"]) &&
|
||||
|
||||
if (isset($_FILES["PROCESS_FILENAME"]) &&
|
||||
$_FILES["PROCESS_FILENAME"]["error"] == 0 &&
|
||||
preg_match("/^(?:pm|pmx|pmx2)$/", pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION))
|
||||
) {
|
||||
@@ -108,7 +107,6 @@ if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if (isset($_FILES["PROCESS_FILENAME"]) && (pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION) == "pmx"
|
||||
|| pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION) == "pmx2")
|
||||
@@ -130,7 +128,7 @@ if (isset($_FILES["PROCESS_FILENAME"]) && (pathinfo($_FILES["PROCESS_FILENAME"][
|
||||
) {
|
||||
die(G::LoadTranslation("ID_IMPORTER_ERROR_FILE_INVALID_TYPE_OR_CORRUPT_DATA"));
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$granularImport = false;
|
||||
$objectsToImport = '';
|
||||
|
||||
@@ -147,7 +145,7 @@ if (isset($_FILES["PROCESS_FILENAME"]) && (pathinfo($_FILES["PROCESS_FILENAME"][
|
||||
if (isset($_POST['objectsToImport']) && !empty(G::json_decode($_POST['objectsToImport']))) {
|
||||
$objectsToImport = G::json_decode($_POST['objectsToImport']);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if ($_POST['generateUid'] === 'generate') {
|
||||
$generateUid = true;
|
||||
$prjUid = $importer->import($opt1, $opt2, $generateUid, $objectsToImport);
|
||||
@@ -178,14 +176,12 @@ if (isset($_FILES["PROCESS_FILENAME"]) && (pathinfo($_FILES["PROCESS_FILENAME"][
|
||||
"project_type_aux" => $proType
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
switch (get_class($e)) {
|
||||
case 'ProcessMaker\BusinessModel\Migrator\ImportException':
|
||||
$result = $e->getNameException();
|
||||
die($result);
|
||||
break;
|
||||
default:
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$groupsExists = ($e->getCode() == XmlImporter::IMPORT_STAT_GROUP_ALREADY_EXISTS) ? 1 : 0;
|
||||
if ($groupsExists === 1) {
|
||||
$arrayGroups = XmlImporter::$affectedGroups;
|
||||
@@ -215,10 +211,8 @@ if (isset($_FILES["PROCESS_FILENAME"]) && (pathinfo($_FILES["PROCESS_FILENAME"][
|
||||
"groupBeforeAccion" => 'uploadFileNewProcess',
|
||||
"importOption" => 0
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
break;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
echo G::json_encode($result);
|
||||
@@ -266,7 +260,6 @@ if (isset($_POST["PRO_FILENAME"]) &&
|
||||
die(G::LoadTranslation( "ID_IMPORTER_ERROR_FILE_INVALID_TYPE_OR_CORRUPT_DATA" ));
|
||||
}
|
||||
try {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$objectsToImport = '';
|
||||
if (version_compare($data['version'], '3.0', '>')) {
|
||||
$dataObject = (isset($data['objects'])) ? explode('|', $data['objects']) : "";
|
||||
@@ -307,7 +300,7 @@ if (isset($_POST["PRO_FILENAME"]) &&
|
||||
$objectsToImport = G::json_decode($_POST['objectsToImport']);
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$prjUid = $importer->import($option, $optionGroup, false, $objectsToImport);
|
||||
|
||||
$oProcess = new Process();
|
||||
@@ -327,14 +320,12 @@ if (isset($_POST["PRO_FILENAME"]) &&
|
||||
"project_type_aux" => $proType
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
switch (get_class($e)) {
|
||||
case 'ProcessMaker\BusinessModel\Migrator\ImportException':
|
||||
$result = $e->getNameException();
|
||||
die($result);
|
||||
break;
|
||||
default:
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$groupsExists = ($e->getCode() == XmlImporter::IMPORT_STAT_GROUP_ALREADY_EXISTS) ? 1 : 0;
|
||||
if ($groupsExists === 1) {
|
||||
$arrayGroups = XmlImporter::$affectedGroups;
|
||||
@@ -359,10 +350,8 @@ if (isset($_POST["PRO_FILENAME"]) &&
|
||||
"groupBeforeAccion" => "uploadFileNewProcess",
|
||||
"importOption" => (isset($_POST["IMPORT_OPTION"])) ? (int)($_POST["IMPORT_OPTION"]) : 0
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
break;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
echo G::json_encode($result);
|
||||
|
||||
@@ -78,13 +78,7 @@ $G_ID_SUB_MENU_SELECTED = '_';
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
||||
|
||||
$consolidated = 0;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) {
|
||||
$consolidated = 1;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$consolidated = 1;
|
||||
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/dbConnections/main.js');
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
use ProcessMaker\ChangeLog\ChangeLog;
|
||||
|
||||
if (isset($_GET['BROWSER_TIME_ZONE_OFFSET'])) {
|
||||
@@ -156,4 +155,3 @@ if (isset($_GET['BROWSER_TIME_ZONE_OFFSET'])) {
|
||||
</html>
|
||||
<?php
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
@@ -34,11 +34,8 @@ if ($handle = opendir(PATH_PLUGINS)) {
|
||||
$pluginName = str_replace(".php", "", $pluginFile);
|
||||
|
||||
if (is_file(PATH_PLUGINS . $pluginName . ".php") && is_dir(PATH_PLUGINS . $pluginName)) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (!$oPluginRegistry->isEnterprisePlugin($pluginName) &&
|
||||
PMLicensedFeatures::getSingleton()
|
||||
->verifyfeature('B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=')
|
||||
) {
|
||||
|
||||
if (!$oPluginRegistry->isEnterprisePlugin($pluginName)) {
|
||||
//Check disabled code
|
||||
$arrayFoundDisabledCode = [];
|
||||
$cs = new CodeScanner(config("system.workspace"));
|
||||
@@ -58,7 +55,6 @@ if ($handle = opendir(PATH_PLUGINS)) {
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
// change to ENABLED
|
||||
require_once($path);
|
||||
|
||||
@@ -233,8 +233,6 @@ try {
|
||||
throw new Exception(G::LoadTranslation('ID_PMPLUGIN_IMPORT_PLUGIN_IS_ENTERPRISE', [$filename]));
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=")) {
|
||||
//Check disabled code
|
||||
$arrayFoundDisabledCode = [];
|
||||
$cs = new CodeScanner(config("system.workspace"));
|
||||
@@ -246,8 +244,6 @@ try {
|
||||
if (!empty($arrayFoundDisabledCode)) {
|
||||
throw new Exception(G::LoadTranslation("ID_DISABLED_CODE_PLUGIN"));
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Get contents of plugin file
|
||||
$sContent = file_get_contents($path . $pluginFile);
|
||||
|
||||
@@ -39,10 +39,7 @@ if (isset( $sfunction ) && $sfunction == 'lookforNameTrigger') {
|
||||
$value = $_POST;
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=") &&
|
||||
isset($value["TRI_WEBBOT"])
|
||||
) {
|
||||
if (isset($value["TRI_WEBBOT"])) {
|
||||
//Check disabled code
|
||||
$arrayFoundDisabledCode = [];
|
||||
$cs = new CodeScanner(config("system.workspace"));
|
||||
@@ -60,7 +57,6 @@ if (isset( $sfunction ) && $sfunction == 'lookforNameTrigger') {
|
||||
throw new Exception(G::LoadTranslation("ID_DISABLED_CODE_TRIGGER", array($strCodeAndLine)));
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$swCreate = true;
|
||||
if ($value['TRI_UID'] != '') {
|
||||
|
||||
@@ -382,16 +382,11 @@ try {
|
||||
'id' => 'PM_DASHBOARD',
|
||||
'name' => strtoupper(G::LoadTranslation('ID_DASHBOARD'))
|
||||
];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
// NEW DASHBOARD MODULE
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) {
|
||||
|
||||
$rows[] = [
|
||||
'id' => 'PM_STRATEGIC_DASHBOARD',
|
||||
'name' => strtoupper(G::LoadTranslation('ID_STRATEGIC_DASHBOARD'))
|
||||
];
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,13 +46,7 @@ if (file_exists($envFile)) {
|
||||
}
|
||||
}
|
||||
|
||||
$languageManagement = 0;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkdKR3ROS0VzWGdoLzNQYz0=')) {
|
||||
$languageManagement = 1;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$languageManagement = 1;
|
||||
|
||||
$arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace"));
|
||||
|
||||
|
||||
@@ -43,13 +43,7 @@ if (file_exists($envFile)) {
|
||||
}
|
||||
}
|
||||
|
||||
$languageManagement = 0;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkdKR3ROS0VzWGdoLzNQYz0=')) {
|
||||
$languageManagement = 1;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$languageManagement = 1;
|
||||
|
||||
$arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace"));
|
||||
|
||||
|
||||
@@ -42,14 +42,7 @@ if (file_exists($envFile)) {
|
||||
}
|
||||
}
|
||||
|
||||
$languageManagement = 0;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkdKR3ROS0VzWGdoLzNQYz0=')) {
|
||||
$languageManagement = 1;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$languageManagement = 1;
|
||||
|
||||
$arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace"));
|
||||
|
||||
|
||||
@@ -709,9 +709,6 @@ class ActionsByEmail
|
||||
$flagLogin = false;
|
||||
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
//SSO
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature('x4TTzlISnp2K2tnSTJoMC8rTDRMTjlhMCtZeXV0QnNCLzU=')) {
|
||||
|
||||
$sso = new \PmSsoClass();
|
||||
|
||||
@@ -729,8 +726,6 @@ class ActionsByEmail
|
||||
require_once(PATH_METHODS . 'login' . PATH_SEP . 'authenticationSso.php');
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if (defined('PM_SINGLE_SIGN_ON')) {
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
@@ -30,7 +30,6 @@ use WsBase;
|
||||
*/
|
||||
class ResponseReader
|
||||
{
|
||||
/*----------------------------------********---------------------------------*/
|
||||
private $channel = "ActionsByEmail";
|
||||
private $case = [];
|
||||
private $messageResponseError = null;
|
||||
@@ -424,5 +423,4 @@ class ResponseReader
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
@@ -4366,7 +4366,6 @@ class Cases
|
||||
$taskSelfServiceTimeUnit = $row["TAS_SELFSERVICE_TIME_UNIT"];
|
||||
$triggerUid = $row["TAS_SELFSERVICE_TRIGGER_UID"];
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$typeOfExecution = $row["TAS_SELFSERVICE_EXECUTION"];
|
||||
$flagExecuteOnce = true;
|
||||
// This option will be executed just once, can check if was executed before
|
||||
@@ -4377,7 +4376,6 @@ class Cases
|
||||
$caseExecuted = $appTimeout->cases();
|
||||
$flagExecuteOnce = !empty($caseExecuted) ? false : true;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
// Add the time in the corresponding unit to the delegation date
|
||||
$delegateDate = calculateDate($delegateDate, $taskSelfServiceTimeUnit, $taskSelfServiceTime);
|
||||
@@ -4431,7 +4429,6 @@ class Cases
|
||||
// Update the case
|
||||
$case->updateCase($appUid, $fieldsCase);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($typeOfExecution == 'ONCE') {
|
||||
// Saving the case`s data if the 'Execution' is set in ONCE.
|
||||
$appTimeoutActionExecuted = new AppTimeoutActionExecuted();
|
||||
@@ -4441,7 +4438,6 @@ class Cases
|
||||
$dataSelf["EXECUTION_DATE"] = time();
|
||||
$appTimeoutActionExecuted->create($dataSelf);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
array_push($casesExecuted, $appNumber); // Register the cases executed
|
||||
|
||||
|
||||
@@ -32,9 +32,7 @@ class CasesList
|
||||
public function __construct()
|
||||
{
|
||||
$this->mapList = [
|
||||
/*----------------------------------********---------------------------------*/
|
||||
'batchRouting' => 'CONSOLIDATED_CASES',
|
||||
/*----------------------------------********---------------------------------*/
|
||||
'canceled' => 'CASES_CANCELLED',
|
||||
'completed' => 'CASES_COMPLETED',
|
||||
'draft' => 'CASES_DRAFT',
|
||||
@@ -44,9 +42,7 @@ class CasesList
|
||||
'unassigned' => 'CASES_SELFSERVICE',
|
||||
];
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$this->batchRouting = new BatchRouting();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$this->canceled = new Canceled();
|
||||
$this->completed = new Completed();
|
||||
$this->draft = new Draft();
|
||||
|
||||
@@ -26,9 +26,7 @@ use ProcessMaker\BusinessModel\Cases as BusinessModelCases;
|
||||
use ProcessMaker\BusinessModel\Lists;
|
||||
use ProcessMaker\BusinessModel\Task as BusinessModelTask;
|
||||
use ProcessMaker\BusinessModel\User as BusinessModelUser;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
use ProcessMaker\ChangeLog\ChangeLog;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
use ProcessMaker\Core\RoutingScreen;
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Model\Documents;
|
||||
@@ -615,10 +613,8 @@ class Light
|
||||
$tasks
|
||||
);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
ChangeLog::getChangeLog()
|
||||
->register();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$array = json_decode(json_encode($fields), true);
|
||||
$array['message'] = trim(strip_tags($array['message']));
|
||||
@@ -891,20 +887,6 @@ class Light
|
||||
$_SESSION["USERNAME_PREVIOUS1"] = $usernamePrevious1;
|
||||
$_SESSION["USERNAME_PREVIOUS2"] = $usernamePrevious2;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$licenseManager = PmLicenseManager::getSingleton();
|
||||
if (in_array(
|
||||
md5($licenseManager->result),
|
||||
array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb')
|
||||
)) {
|
||||
$G_PUBLISH = new \Publisher();
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/licenseExpired', '', array(), 'licenseUpdate');
|
||||
G::RenderPage('publish');
|
||||
die();
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
try {
|
||||
$oatoken = new \OauthAccessTokens();
|
||||
$result = $oatoken->remove($oauthAccessTokenId);
|
||||
@@ -1404,13 +1386,8 @@ class Light
|
||||
$response = [];
|
||||
|
||||
$sysConf = Bootstrap::getSystemConfiguration('', '', config("system.workspace"));
|
||||
$multiTimeZone = false;
|
||||
//Set Time Zone
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (\PMLicensedFeatures::getSingleton()->verifyfeature('oq3S29xemxEZXJpZEIzN01qenJUaStSekY4cTdJVm5vbWtVM0d4S2lJSS9qUT0=')) {
|
||||
$multiTimeZone = (int) ($sysConf['system_utc_time_zone']) == 1;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$multiTimeZone = (int) ($sysConf['system_utc_time_zone']) == 1;
|
||||
|
||||
$tz = isset($_SESSION['USR_TIME_ZONE']) ? $_SESSION['USR_TIME_ZONE'] : $sysConf['time_zone'];
|
||||
$offset = timezone_offset_get(new \DateTimeZone($tz), new \DateTime());
|
||||
$response['timeZone'] = sprintf(
|
||||
@@ -1424,9 +1401,6 @@ class Light
|
||||
$response['version'] = $fields['PM_VERSION'];
|
||||
|
||||
$buildType = 'Community';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$buildType = 'Enterprise';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$response['buildType'] = $buildType;
|
||||
|
||||
$conf = new Configurations();
|
||||
@@ -1532,20 +1506,10 @@ class Light
|
||||
$dataList['appUidCheck'] = $casesToCheck;
|
||||
$dataList['userId'] = $userUid;
|
||||
$dataList['action'] = $action;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
//In enterprise version this block of code should always be executed
|
||||
//In community version this block of code is deleted and is executed the other
|
||||
|
||||
$list = new Lists();
|
||||
$response = $list->getList($listName, $dataList);
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$case = new Cases();
|
||||
$response = $case->getList($dataList);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$result = [];
|
||||
foreach ($data as $key => $val) {
|
||||
$flagRemoved = true;
|
||||
|
||||
@@ -64,9 +64,7 @@ class Lists
|
||||
'ListParticipated' => 'CASES_SENT',
|
||||
'ListPaused' => 'CASES_PAUSED',
|
||||
'ListCompleted' => 'CASES_COMPLETED',
|
||||
/*----------------------------------********---------------------------------*/
|
||||
'ListConsolidated' => 'CONSOLIDATED_CASES',
|
||||
/*----------------------------------********---------------------------------*/
|
||||
];
|
||||
|
||||
// If the feature for highlight the home folders is disabled, add self-service list to the map
|
||||
@@ -82,9 +80,7 @@ class Lists
|
||||
$this->ListPaused = new \ListPaused();
|
||||
$this->ListCompleted = new \ListCompleted();
|
||||
$this->ListSelfService = new \ListUnassigned();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$this->ListConsolidated = new Consolidated();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
|
||||
@@ -306,7 +302,6 @@ class Lists
|
||||
'item' => $item
|
||||
]));
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
case 'ListConsolidated':
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) {
|
||||
@@ -314,7 +309,6 @@ class Lists
|
||||
array_push($response, (array('count' => $total, 'item' => $item)));
|
||||
}
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
default:
|
||||
$totalInbox = $this->$listObject->getCountList($userId);
|
||||
array_push($response, (array('count' => $totalInbox, 'item' => $item)));
|
||||
|
||||
@@ -161,14 +161,12 @@ class ProcessPermissions
|
||||
$objectType = G::LoadTranslation('MSGS_HISTORY');
|
||||
$object = G::LoadTranslation('ID_ALL');
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
case 'REASSIGN_MY_CASES':
|
||||
$objectType = G::LoadTranslation('ID_REASSIGN_MY_CASES');
|
||||
$object = self::DOES_NOT_APPLY;
|
||||
$aRow['OP_ACTION'] = self::DOES_NOT_APPLY;
|
||||
$participated = self::DOES_NOT_APPLY;
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
default:
|
||||
$objectType = G::LoadTranslation('ID_ALL');
|
||||
$object = G::LoadTranslation('ID_ALL');
|
||||
|
||||
@@ -181,10 +181,8 @@ class Task
|
||||
array(
|
||||
"TAS_TRANSFER_FLY" => $arrayDataAux["TAS_TRANSFER_FLY"],
|
||||
"TAS_DURATION" => $arrayDataAux["TAS_DURATION"],
|
||||
/*----------------------------------********---------------------------------*/
|
||||
"TAS_AVERAGE" => $arrayDataAux["TAS_AVERAGE"],
|
||||
"TAS_SDV" => $arrayDataAux["TAS_SDV"],
|
||||
/*----------------------------------********---------------------------------*/
|
||||
"TAS_TIMEUNIT" => $arrayDataAux["TAS_TIMEUNIT"],
|
||||
"TAS_TYPE_DAY" => $arrayDataAux["TAS_TYPE_DAY"],
|
||||
"TAS_CALENDAR" => $arrayDataAux["TAS_CALENDAR"]
|
||||
|
||||
@@ -130,7 +130,6 @@ class TaskSchedulerBM
|
||||
"expression" => "*/5 * * * 0,1,2,3,4,5,6",
|
||||
"description" => "ID_TASK_SCHEDULER_MESSAGE_EVENTS_DESC"
|
||||
]
|
||||
/*----------------------------------********---------------------------------*/
|
||||
,[
|
||||
"title" => "ID_TASK_SCHEDULER_ACTION_EMAIL",
|
||||
"enable" => "1",
|
||||
@@ -223,7 +222,6 @@ class TaskSchedulerBM
|
||||
"expression" => "0 0 * * 0,1,2,3,4,5,6",
|
||||
"description" => "ID_TASK_SCHEDULER_PM_PLUGINS_DESC"
|
||||
]
|
||||
/*----------------------------------********---------------------------------*/
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -174,10 +174,7 @@ class Trigger
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=") &&
|
||||
isset($dataTrigger["TRI_WEBBOT"])
|
||||
) {
|
||||
if (isset($dataTrigger["TRI_WEBBOT"])) {
|
||||
//Check disabled code
|
||||
$arrayFoundDisabledCode = [];
|
||||
$cs = new CodeScanner(config("system.workspace"));
|
||||
@@ -196,7 +193,6 @@ class Trigger
|
||||
throw new Exception(G::LoadTranslation("ID_DISABLED_CODE_TRIGGER", [$strCodeAndLine]));
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$dataTrigger['PRO_UID'] = $proUid;
|
||||
$trigger = new ModelTriggers();
|
||||
|
||||
@@ -216,7 +216,6 @@ class User
|
||||
"defaultValues" => array(),
|
||||
"fieldNameAux" => "usrCellular"
|
||||
),
|
||||
/*----------------------------------********---------------------------------*/
|
||||
"USR_COST_BY_HOUR" => array(
|
||||
"type" => "string",
|
||||
"required" => false,
|
||||
@@ -231,7 +230,6 @@ class User
|
||||
"defaultValues" => array(),
|
||||
"fieldNameAux" => "usrUnitCost"
|
||||
),
|
||||
/*----------------------------------********---------------------------------*/
|
||||
'USR_LOGGED_NEXT_TIME' => [
|
||||
'type' => 'int',
|
||||
'required' => false,
|
||||
@@ -690,10 +688,8 @@ class User
|
||||
$arrayResult[$this->getFieldNameByFormatFieldName('USR_CALENDAR_UID')] = $aFields['USR_CALENDAR_UID'];
|
||||
$arrayResult[$this->getFieldNameByFormatFieldName('USR_CALENDAR_NAME')] = $aFields['USR_CALENDAR'];
|
||||
$arrayResult[$this->getFieldNameByFormatFieldName('USR_UX')] = $record['USR_UX'];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$arrayResult[$this->getFieldNameByFormatFieldName('USR_COST_BY_HOUR')] = $record['USR_COST_BY_HOUR'];
|
||||
$arrayResult[$this->getFieldNameByFormatFieldName('USR_UNIT_COST')] = $record['USR_UNIT_COST'];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$arrayResult[$this->getFieldNameByFormatFieldName('USR_PHOTO_PATH')] = $pathPhotoUser;
|
||||
|
||||
if (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) {
|
||||
@@ -744,10 +740,8 @@ class User
|
||||
$criteria->addSelectColumn(UsersPeer::USR_REPORTS_TO);
|
||||
$criteria->addSelectColumn(UsersPeer::USR_REPLACED_BY);
|
||||
$criteria->addSelectColumn(UsersPeer::USR_UX);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$criteria->addSelectColumn(UsersPeer::USR_COST_BY_HOUR);
|
||||
$criteria->addSelectColumn(UsersPeer::USR_UNIT_COST);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$criteria->addSelectColumn(UsersPeer::USR_TIME_ZONE);
|
||||
|
||||
//Return
|
||||
@@ -784,7 +778,6 @@ class User
|
||||
$arrayData['USR_UNIT_COST']
|
||||
);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (array_key_exists('USR_COST_BY_HOUR', $arrayDataAux)) {
|
||||
$arrayData['USR_COST_BY_HOUR'] = $arrayDataAux['USR_COST_BY_HOUR'];
|
||||
}
|
||||
@@ -792,7 +785,6 @@ class User
|
||||
if (array_key_exists('USR_UNIT_COST', $arrayDataAux)) {
|
||||
$arrayData['USR_UNIT_COST'] = $arrayDataAux['USR_UNIT_COST'];
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$this->throwExceptionIfDataIsInvalid("", $arrayData);
|
||||
|
||||
@@ -884,7 +876,6 @@ class User
|
||||
$arrayData['USR_UNIT_COST']
|
||||
);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (array_key_exists('USR_COST_BY_HOUR', $arrayDataAux)) {
|
||||
$arrayData['USR_COST_BY_HOUR'] = $arrayDataAux['USR_COST_BY_HOUR'];
|
||||
}
|
||||
@@ -892,7 +883,6 @@ class User
|
||||
if (array_key_exists('USR_UNIT_COST', $arrayDataAux)) {
|
||||
$arrayData['USR_UNIT_COST'] = $arrayDataAux['USR_UNIT_COST'];
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Verify data
|
||||
$this->throwExceptionIfNotExistsUser($userUid, $this->arrayFieldNameForException["usrUid"]);
|
||||
@@ -2003,15 +1993,8 @@ class User
|
||||
$row['USR_ROLE_ID'] = $row['USR_ROLE'];
|
||||
$row['USR_ROLE'] = isset($uRole['ROL_NAME']) ? ($uRole['ROL_NAME'] != '' ? $uRole['ROL_NAME'] : $uRole['ROL_CODE']) : $uRole['ROL_CODE'];
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
$total = $oParticipated->getCountList($row['USR_UID']);
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$total = $oAppCache->getListCounters('sent', $row['USR_UID'], false);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$total = $oParticipated->getCountList($row['USR_UID']);
|
||||
|
||||
$row['TOTAL_CASES'] = $total;
|
||||
|
||||
$row['DUE_DATE_OK'] = (date('Y-m-d') > date('Y-m-d', strtotime($row['USR_DUE_DATE']))) ? 0 : 1;
|
||||
|
||||
@@ -190,18 +190,11 @@ trait CasesTrait
|
||||
}
|
||||
//Events - End
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
// Set users drive - start
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) {
|
||||
$drive = new AppDocumentDrive();
|
||||
if ($drive->getStatusDrive()) {
|
||||
//add users email next task
|
||||
$drive->addUsersDocumentDrive($appFields['APP_UID']);
|
||||
}
|
||||
}
|
||||
// Set users drive - End
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$result = [
|
||||
'appFields' => $appFields,
|
||||
|
||||
@@ -300,7 +300,6 @@ class Installer
|
||||
$this->log("Write: " . $db_file . " => " . ((!$ff) ? $ff : "OK") . "\n", $ff === false);
|
||||
fclose($fp);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
//Generate the env.ini file
|
||||
$envIniFile = $path_site . 'env.ini';
|
||||
$content = 'system_utc_time_zone = 1' . "\n";
|
||||
@@ -310,7 +309,6 @@ class Installer
|
||||
$ff = @fwrite($fp, $content, strlen($content));
|
||||
$this->log('Write: ' . $envIniFile . ' => ' . ((!$ff) ? $ff : 'OK') . "\n", $ff === false);
|
||||
fclose($fp);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Set data
|
||||
$this->setPartner();
|
||||
|
||||
@@ -194,16 +194,13 @@ abstract class Importer
|
||||
$this->importData["tables"]["workflow"]["process"][0]["PRO_CREATE_DATE"] = $obj->getProCreateDate();
|
||||
}
|
||||
//Shouldn't generate new UID for all objects
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($objectsToImport === '') {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
try {
|
||||
$this->verifyIfTheProcessHasStartedCases();
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
$this->removeProject(false);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
} else {
|
||||
$granularObj = new \ProcessMaker\BusinessModel\Migrator\GranularImporter();
|
||||
$objectList = $granularObj->loadObjectsListSelected($this->importData, $objectsToImport);
|
||||
@@ -231,7 +228,6 @@ abstract class Importer
|
||||
throw $exception;
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$generateUid = false;
|
||||
break;
|
||||
case self::IMPORT_OPTION_DISABLE_AND_CREATE_NEW:
|
||||
@@ -268,7 +264,7 @@ abstract class Importer
|
||||
if (!empty($generateUidFromJs)) {
|
||||
$generateUid = $generateUidFromJs;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Granular Import
|
||||
try {
|
||||
if ($generateUidFromJs || $keepCreateDate) {
|
||||
@@ -343,7 +339,6 @@ abstract class Importer
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$result = $this->doImport($generateUid);
|
||||
$this->updateProcessInformation($result);
|
||||
|
||||
@@ -793,17 +793,13 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
private function createTaskByElement($elementUid, $elementType, $key, $eventName = '')
|
||||
{
|
||||
try {
|
||||
$taskTitle = $taskType = $this->arrayTaskAttribute[$key]["type"];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$taskTitle = empty($eventName) ? $taskType : $eventName;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if (isset($this->arrayElementTaskRelation[$elementUid])) {
|
||||
$taskUid = $this->arrayElementTaskRelation[$elementUid];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$dataTask = ["TAS_TITLE" => $taskTitle];
|
||||
$this->wp->updateTask($taskUid, $dataTask);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
} else {
|
||||
$taskPosX = 0;
|
||||
$taskPosY = 0;
|
||||
|
||||
@@ -154,13 +154,12 @@ class ActionsByEmail extends Api
|
||||
$arrayData = $filesManager->addProcessFilesManager($proId, $userUid, $data);
|
||||
@copy(PATH_TPL . 'actionsByEmail' . PATH_SEP . 'actionsByEmail.html', $path . 'actionsByEmail.html');
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if (!file_exists($path . 'actionsByEmailErrorReply.html')) {
|
||||
$data = array('prf_content' => '', 'prf_filename' => 'actionsByEmailErrorReply.html', 'prf_path' => 'templates');
|
||||
$arrayData = $filesManager->addProcessFilesManager($proId, $userUid, $data);
|
||||
@copy(PATH_TPL . 'actionsByEmail' . PATH_SEP . 'actionsByEmailErrorReply.html', $path . 'actionsByEmailErrorReply.html');
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
$directory = dir($path);
|
||||
|
||||
@@ -230,19 +230,8 @@ class Light extends Api
|
||||
Validator::throwExceptionIfDataNotMetIso8601Format($dataList, $this->arrayFieldIso8601);
|
||||
$dataList = DateTime::convertDataToUtc($dataList, $this->arrayFieldIso8601);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
//In enterprise version this block of code should always be executed
|
||||
//In community version this block of code is deleted and is executed the other
|
||||
$list = new Lists();
|
||||
$response = $list->getList('inbox', $dataList);
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$case = new BusinessModelCases();
|
||||
$response = $case->getList($dataList);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$list = new Lists();
|
||||
$response = $list->getList('inbox', $dataList);
|
||||
|
||||
//Complete the list information with some task properties
|
||||
$response['data'] = $this->addTaskProperties($response['data']);
|
||||
@@ -345,19 +334,8 @@ class Light extends Api
|
||||
Validator::throwExceptionIfDataNotMetIso8601Format($dataList, $this->arrayFieldIso8601);
|
||||
$dataList = DateTime::convertDataToUtc($dataList, $this->arrayFieldIso8601);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
//In enterprise version this block of code should always be executed
|
||||
//In community version this block of code is deleted and is executed the other
|
||||
$list = new Lists();
|
||||
$response = $list->getList('inbox', $dataList);
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$case = new BusinessModelCases();
|
||||
$response = $case->getList($dataList);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$list = new Lists();
|
||||
$response = $list->getList('inbox', $dataList);
|
||||
|
||||
//Complete the list information with some task properties
|
||||
$response['data'] = $this->addTaskProperties($response['data']);
|
||||
@@ -456,19 +434,8 @@ class Light extends Api
|
||||
Validator::throwExceptionIfDataNotMetIso8601Format($dataList, $this->arrayFieldIso8601);
|
||||
$dataList = DateTime::convertDataToUtc($dataList, $this->arrayFieldIso8601);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
//In enterprise version this block of code should always be executed
|
||||
//In community version this block of code is deleted and is executed the other
|
||||
$list = new Lists();
|
||||
$response = $list->getList('participated_last', $dataList);
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$case = new BusinessModelCases();
|
||||
$response = $case->getList($dataList);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$list = new Lists();
|
||||
$response = $list->getList('participated_last', $dataList);
|
||||
|
||||
$result = $this->parserDataParticipated($response['data']);
|
||||
|
||||
@@ -558,19 +525,8 @@ class Light extends Api
|
||||
$dataList['newerThan'] = $newerThan;
|
||||
$dataList['oldestthan'] = $oldestthan;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
//In enterprise version this block of code should always be executed
|
||||
//In community version this block of code is deleted and is executed the other
|
||||
$list = new Lists();
|
||||
$response = $list->getList('paused', $dataList);
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$case = new BusinessModelCases();
|
||||
$response = $case->getList($dataList);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$list = new Lists();
|
||||
$response = $list->getList('paused', $dataList);
|
||||
|
||||
$result = $this->parserDataParticipated($response['data']);
|
||||
|
||||
@@ -657,19 +613,9 @@ class Light extends Api
|
||||
Validator::throwExceptionIfDataNotMetIso8601Format($dataList, $this->arrayFieldIso8601);
|
||||
$dataList = DateTime::convertDataToUtc($dataList, $this->arrayFieldIso8601);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
//In enterprise version this block of code should always be executed
|
||||
//In community version this block of code is deleted and is executed the other
|
||||
$oCases = new Lists();
|
||||
$response = $oCases->getList('unassigned', $dataList);
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$oCases = new BusinessModelCases();
|
||||
$response = $oCases->getList($dataList);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$oCases = new Lists();
|
||||
$response = $oCases->getList('unassigned', $dataList);
|
||||
|
||||
if ($paged === true) {
|
||||
$response = $response['data'];
|
||||
}
|
||||
|
||||
@@ -77,11 +77,7 @@ class Activity extends Api
|
||||
{
|
||||
try {
|
||||
$configurations = array();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
/*** starts retrieval of action by emails configuration ***/
|
||||
if (\PMLicensedFeatures
|
||||
::getSingleton()
|
||||
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
|
||||
$params = array(
|
||||
'type' => 'activity',
|
||||
'form' => 'configuration',
|
||||
@@ -90,9 +86,7 @@ class Activity extends Api
|
||||
);
|
||||
$actionsByEmailService = new \ProcessMaker\BusinessModel\ActionsByEmail();
|
||||
$configurations[] = $actionsByEmailService->loadConfiguration($params);
|
||||
}
|
||||
/*** end retrieval of action by emails configuration ***/
|
||||
/*----------------------------------********---------------------------------*/
|
||||
return $configurations;
|
||||
} catch (\Exception $e) {
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
@@ -123,16 +117,11 @@ class Activity extends Api
|
||||
}
|
||||
$task = new \ProcessMaker\BusinessModel\Task();
|
||||
$properties = $task->updateProperties($prj_uid, $act_uid, $request_data);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (\PMLicensedFeatures
|
||||
::getSingleton()
|
||||
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
|
||||
|
||||
if (isset($request_data['properties']['_features'])) {
|
||||
$actionsByEmailService = new \ProcessMaker\BusinessModel\ActionsByEmail();
|
||||
$actionsByEmailService->saveConfiguration($request_data['properties']['_features']);
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
} catch (\Exception $e) {
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
|
||||
@@ -95,18 +95,7 @@ class System extends Api
|
||||
{
|
||||
try {
|
||||
$enabledFeatures = [];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$keys = ['zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=',
|
||||
'oq3S29xemxEZXJpZEIzN01qenJUaStSekY4cTdJVm5vbWtVM0d4S2lJSS9qUT0=',
|
||||
'jXsSi94bkRUcVZyRStNVExlTXhEclVadGRRcG9xbjNvTWVFQUF3cklKQVBiVT0='];
|
||||
foreach ($keys as $key) {
|
||||
if (PMLicensedFeatures
|
||||
::getSingleton()
|
||||
->verifyfeature($key)) {
|
||||
$enabledFeatures[] = $key;
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$enabledFeatures[] = $key;
|
||||
|
||||
return $enabledFeatures;
|
||||
} catch (Exception $e) {
|
||||
|
||||
@@ -13,8 +13,6 @@ class Authentication
|
||||
{
|
||||
$responseToken = array('msg' => \G::LoadTranslation( 'ID_UPGRADE_ENTERPRISE' ));
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//Lets verify the gmail token
|
||||
$url = 'https://www.googleapis.com/oauth2/v1/tokeninfo?access_token='.$request_data['token'];
|
||||
|
||||
@@ -73,8 +71,6 @@ class Authentication
|
||||
throw (new \Exception(\G::LoadTranslation( 'ID_PMGMAIL_VALID' )));
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
return $responseToken;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,7 @@ use Luracast\Restler\RestException;
|
||||
use OAuth2\Request;
|
||||
use OAuth2\Response;
|
||||
use PmoauthUserAccessTokens;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
use ProcessMaker\ChangeLog\ChangeLog;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Policies\ControlUnderUpdating;
|
||||
|
||||
@@ -389,7 +387,6 @@ class Server implements iAuthenticate
|
||||
$_SESSION['USR_TIME_ZONE'] = $userTimeZone;
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
ChangeLog::getChangeLog()
|
||||
->setUsrId(is_null($user) ? 0 : $user->getUsrId())
|
||||
->setSkin(SYS_SKIN)
|
||||
@@ -402,7 +399,6 @@ class Server implements iAuthenticate
|
||||
ChangeLog::getChangeLog()
|
||||
->setSourceId(ChangeLog::FromWeb);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
return $allowed;
|
||||
}
|
||||
|
||||
@@ -76,20 +76,15 @@ $ID_REQUIRED_FIELDS_ERROR = $filter->xssFilterHard(G::LoadTranslation('ID_REQUIR
|
||||
$previouspage = $_POST['previous_step']['PAGE'];
|
||||
|
||||
$html .= '</td></tr><tr><td align="center">';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if($netxpage == ""){
|
||||
$html .= '<a href='.$previouspage.'>';
|
||||
$html .= '<input type="button" value="Back" class="module_app_button___gray" />';
|
||||
$html .= '</a>';
|
||||
} else{
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$html .= '<input type="button" value="Back" class="module_app_button___gray" onclick="javascript:history.back()">';
|
||||
$html .= '<input type="button" value="Continue" class="module_app_button___gray" onclick="javascript:location.href=\''.$netxpage.'\'">';
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
echo '<div class="grid" style="width:'.$width_content.'">
|
||||
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
||||
|
||||
Reference in New Issue
Block a user