diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index 03cabb9a9..b51f9a976 100644 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -5708,9 +5708,8 @@ class G $conf = new Configurations(); $flag = $conf->getConfiguration('AUDIT_LOG', 'log'); $flagAudit = $flag == 'true' ? true : false; - /*----------------------------------********---------------------------------*/ - $licensedFeatures = PMLicensedFeatures::getSingleton(); - if ($flagAudit && $licensedFeatures->verifyfeature('vtSeHNhT0JnSmo1bTluUVlTYUxUbUFSVStEeXVqc1pEUG5EeXc0MGd2Q3ErYz0=')) { + + if ($flagAudit) { $userUid = 'Unknow User'; $fullName = '-'; if (isset($_SESSION['USER_LOGGED']) && $_SESSION['USER_LOGGED'] != '') { @@ -5734,7 +5733,6 @@ class G ]; Log::channel('audit:' . $actionToLog)->info($message, Bootstrap::context($context)); } - /*----------------------------------********---------------------------------*/ } /** diff --git a/gulliver/system/class.rbac.php b/gulliver/system/class.rbac.php index 80c77856d..010950462 100644 --- a/gulliver/system/class.rbac.php +++ b/gulliver/system/class.rbac.php @@ -1010,17 +1010,6 @@ class RBAC */ public function VerifyLogin($strUser, $strPass) { - /*----------------------------------********---------------------------------*/ - - $licenseManager = PmLicenseManager::getSingleton(); - if (in_array( - G::encryptOld($licenseManager->result), - ['38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'] - )) { - return -7; - } - /*----------------------------------********---------------------------------*/ - if (strlen($strPass) === 0) { return -2; } diff --git a/thirdparty/propel/Propel.php b/thirdparty/propel/Propel.php index fb3e5ccb1..a706b66d6 100644 --- a/thirdparty/propel/Propel.php +++ b/thirdparty/propel/Propel.php @@ -626,14 +626,6 @@ class Propel */ public static function getDbConnection($name) { - /*----------------------------------********---------------------------------*/ - if (!PMLicensedFeatures::getSingleton()->verifyfeature('02YeEFKNnVoOWFKMzN4ZmpXT0V3MU9SVklnOXNCcE9zcXJKa0tpemNmQkJ5OTUvOWlLdFhibGp0MHVHUlV0VmNpNw==')) { - /*----------------------------------********---------------------------------*/ - return null; - /*----------------------------------********---------------------------------*/ - } - /*----------------------------------********---------------------------------*/ - if (!empty(self::$configuration['datasources'][$name]['connection'])) { return self::getConnection($name); } diff --git a/workflow/engine/bin/cron_single.php b/workflow/engine/bin/cron_single.php index 38eea9358..6780fc46d 100644 --- a/workflow/engine/bin/cron_single.php +++ b/workflow/engine/bin/cron_single.php @@ -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()); } } -/*----------------------------------********---------------------------------*/ diff --git a/workflow/engine/bin/tasks/cliAddons.php b/workflow/engine/bin/tasks/cliAddons.php index 2af2f1aea..877e95b76 100644 --- a/workflow/engine/bin/tasks/cliAddons.php +++ b/workflow/engine/bin/tasks/cliAddons.php @@ -1,6 +1,5 @@ setState("error"); } } -/*----------------------------------********---------------------------------*/ + function change_hash($command, $opts) { if (count($command) < 2) { @@ -91,4 +89,3 @@ function change_hash($command, $opts) } } } -/*----------------------------------********---------------------------------*/ \ No newline at end of file diff --git a/workflow/engine/bin/tasks/cliUpgrade.php b/workflow/engine/bin/tasks/cliUpgrade.php index 677a9acff..78bed0433 100644 --- a/workflow/engine/bin/tasks/cliUpgrade.php +++ b/workflow/engine/bin/tasks/cliUpgrade.php @@ -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 diff --git a/workflow/engine/bin/tasks/cliWorkspaces.php b/workflow/engine/bin/tasks/cliWorkspaces.php index 7872505e7..90c5cc43a 100644 --- a/workflow/engine/bin/tasks/cliWorkspaces.php +++ b/workflow/engine/bin/tasks/cliWorkspaces.php @@ -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(<< 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 diff --git a/workflow/engine/classes/Cases.php b/workflow/engine/classes/Cases.php index b91951091..373c24ddf 100644 --- a/workflow/engine/classes/Cases.php +++ b/workflow/engine/classes/Cases.php @@ -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 .= "
- " . $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 - /*----------------------------------********---------------------------------*/ ]; } diff --git a/workflow/engine/classes/Derivation.php b/workflow/engine/classes/Derivation.php index 405725933..04d3251da 100644 --- a/workflow/engine/classes/Derivation.php +++ b/workflow/engine/classes/Derivation.php @@ -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(); diff --git a/workflow/engine/classes/PMLicensedFeatures.php b/workflow/engine/classes/PMLicensedFeatures.php index 2b6cd7425..93aa97e75 100644 --- a/workflow/engine/classes/PMLicensedFeatures.php +++ b/workflow/engine/classes/PMLicensedFeatures.php @@ -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); } - /*----------------------------------********---------------------------------*/ } diff --git a/workflow/engine/classes/ProcessMap.php b/workflow/engine/classes/ProcessMap.php index 8a3646ea0..1d741440d 100644 --- a/workflow/engine/classes/ProcessMap.php +++ b/workflow/engine/classes/ProcessMap.php @@ -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'); diff --git a/workflow/engine/classes/Processes.php b/workflow/engine/classes/Processes.php index 0101b739d..ea781178c 100644 --- a/workflow/engine/classes/Processes.php +++ b/workflow/engine/classes/Processes.php @@ -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; diff --git a/workflow/engine/classes/WorkspaceTools.php b/workflow/engine/classes/WorkspaceTools.php index 0a4f3fc20..1666f9e54 100755 --- a/workflow/engine/classes/WorkspaceTools.php +++ b/workflow/engine/classes/WorkspaceTools.php @@ -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. diff --git a/workflow/engine/classes/WsBase.php b/workflow/engine/classes/WsBase.php index 5e41c6e81..55acc5e0b 100644 --- a/workflow/engine/classes/WsBase.php +++ b/workflow/engine/classes/WsBase.php @@ -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 */ diff --git a/workflow/engine/classes/model/AppCacheView.php b/workflow/engine/classes/model/AppCacheView.php index a4e95f175..e6b929d6b 100644 --- a/workflow/engine/classes/model/AppCacheView.php +++ b/workflow/engine/classes/model/AppCacheView.php @@ -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); } } - /*----------------------------------********---------------------------------*/ } diff --git a/workflow/engine/classes/model/AppDelegation.php b/workflow/engine/classes/model/AppDelegation.php index 976e86125..40e3000bc 100644 --- a/workflow/engine/classes/model/AppDelegation.php +++ b/workflow/engine/classes/model/AppDelegation.php @@ -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) { diff --git a/workflow/engine/classes/model/AppDocument.php b/workflow/engine/classes/model/AppDocument.php index f134081eb..034bd2d66 100644 --- a/workflow/engine/classes/model/AppDocument.php +++ b/workflow/engine/classes/model/AppDocument.php @@ -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) { diff --git a/workflow/engine/classes/model/Application.php b/workflow/engine/classes/model/Application.php index 46ef87df2..56530d0fe 100755 --- a/workflow/engine/classes/model/Application.php +++ b/workflow/engine/classes/model/Application.php @@ -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() ); } } - /*----------------------------------********---------------------------------*/ } diff --git a/workflow/engine/classes/model/ObjectPermission.php b/workflow/engine/classes/model/ObjectPermission.php index b86142b6f..7d5ffaf87 100644 --- a/workflow/engine/classes/model/ObjectPermission.php +++ b/workflow/engine/classes/model/ObjectPermission.php @@ -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; } diff --git a/workflow/engine/classes/model/Task.php b/workflow/engine/classes/model/Task.php index e8a898d77..02001fc50 100644 --- a/workflow/engine/classes/model/Task.php +++ b/workflow/engine/classes/model/Task.php @@ -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 { diff --git a/workflow/engine/classes/model/UsersProperties.php b/workflow/engine/classes/model/UsersProperties.php index 8e20454eb..33ce4517a 100644 --- a/workflow/engine/classes/model/UsersProperties.php +++ b/workflow/engine/classes/model/UsersProperties.php @@ -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; - /*----------------------------------********---------------------------------*/ } } diff --git a/workflow/engine/controllers/InstallerModule.php b/workflow/engine/controllers/InstallerModule.php index 766f38354..c6df71a34 100644 --- a/workflow/engine/controllers/InstallerModule.php +++ b/workflow/engine/controllers/InstallerModule.php @@ -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'; diff --git a/workflow/engine/controllers/admin.php b/workflow/engine/controllers/admin.php index e67666266..9e7ef098a 100644 --- a/workflow/engine/controllers/admin.php +++ b/workflow/engine/controllers/admin.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; diff --git a/workflow/engine/controllers/designer.php b/workflow/engine/controllers/designer.php index 46733dfef..264bc25d3 100644 --- a/workflow/engine/controllers/designer.php +++ b/workflow/engine/controllers/designer.php @@ -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); diff --git a/workflow/engine/controllers/home.php b/workflow/engine/controllers/home.php index 61b3bc4b4..50dc3ff87 100644 --- a/workflow/engine/controllers/home.php +++ b/workflow/engine/controllers/home.php @@ -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') { diff --git a/workflow/engine/controllers/main.php b/workflow/engine/controllers/main.php index 26047b2b5..cedd43681 100644 --- a/workflow/engine/controllers/main.php +++ b/workflow/engine/controllers/main.php @@ -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; diff --git a/workflow/engine/menus/cases.php b/workflow/engine/menus/cases.php index 4e213e62d..41b9088a1 100644 --- a/workflow/engine/menus/cases.php +++ b/workflow/engine/menus/cases.php @@ -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', diff --git a/workflow/engine/menus/home.php b/workflow/engine/menus/home.php index 11f086c9c..b11371a01 100644 --- a/workflow/engine/menus/home.php +++ b/workflow/engine/menus/home.php @@ -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', diff --git a/workflow/engine/menus/processmaker.php b/workflow/engine/menus/processmaker.php index dc37285f0..065549c67 100644 --- a/workflow/engine/menus/processmaker.php +++ b/workflow/engine/menus/processmaker.php @@ -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) { diff --git a/workflow/engine/menus/setup.php b/workflow/engine/menus/setup.php index 016169c91..56c27eaca 100755 --- a/workflow/engine/menus/setup.php +++ b/workflow/engine/menus/setup.php @@ -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 = " (" . $licenseStatusInfo["message"] . ")"; } -/*----------------------------------********---------------------------------*/ + 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') ); - /*----------------------------------********---------------------------------*/ } \ No newline at end of file diff --git a/workflow/engine/methods/authSources/authSources_Ajax.php b/workflow/engine/methods/authSources/authSources_Ajax.php index 25aab792e..84fa8ee57 100644 --- a/workflow/engine/methods/authSources/authSources_Ajax.php +++ b/workflow/engine/methods/authSources/authSources_Ajax.php @@ -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; diff --git a/workflow/engine/methods/authSources/authSources_List.php b/workflow/engine/methods/authSources/authSources_List.php index 404556efa..6a4dcd24e 100644 --- a/workflow/engine/methods/authSources/authSources_List.php +++ b/workflow/engine/methods/authSources/authSources_List.php @@ -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); diff --git a/workflow/engine/methods/authSources/authSources_SearchUsers.php b/workflow/engine/methods/authSources/authSources_SearchUsers.php index 4c1489cf6..39fa23bd2 100644 --- a/workflow/engine/methods/authSources/authSources_SearchUsers.php +++ b/workflow/engine/methods/authSources/authSources_SearchUsers.php @@ -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'); diff --git a/workflow/engine/methods/cases/ajaxListener.php b/workflow/engine/methods/cases/ajaxListener.php index bf331a0e6..bafcc234f 100644 --- a/workflow/engine/methods/cases/ajaxListener.php +++ b/workflow/engine/methods/cases/ajaxListener.php @@ -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() diff --git a/workflow/engine/methods/cases/casesListExtJs.php b/workflow/engine/methods/cases/casesListExtJs.php index d8d816a03..36fbb4617 100644 --- a/workflow/engine/methods/cases/casesListExtJs.php +++ b/workflow/engine/methods/cases/casesListExtJs.php @@ -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; } -/*----------------------------------********---------------------------------*/ diff --git a/workflow/engine/methods/cases/casesListExtJsRedirector.php b/workflow/engine/methods/cases/casesListExtJsRedirector.php index 0b21cd7da..013361010 100644 --- a/workflow/engine/methods/cases/casesListExtJsRedirector.php +++ b/workflow/engine/methods/cases/casesListExtJsRedirector.php @@ -1,15 +1,12 @@