Upgrade PHP files

This commit is contained in:
Fernando Ontiveros
2025-03-28 13:16:06 +00:00
parent 7f3ee186de
commit 039ade9083
83 changed files with 96 additions and 745 deletions

View File

@@ -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();

View File

@@ -30,7 +30,6 @@ use WsBase;
*/
class ResponseReader
{
/*----------------------------------********---------------------------------*/
private $channel = "ActionsByEmail";
private $case = [];
private $messageResponseError = null;
@@ -424,5 +423,4 @@ class ResponseReader
);
return $result;
}
/*----------------------------------********---------------------------------*/
}

View File

@@ -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

View File

@@ -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();

View File

@@ -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;

View File

@@ -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)));

View File

@@ -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');

View File

@@ -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"]

View File

@@ -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"
]
/*----------------------------------********---------------------------------*/
];
/**

View File

@@ -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();

View File

@@ -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;

View File

@@ -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,

View File

@@ -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();

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);

View File

@@ -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'];
}

View File

@@ -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());
}

View File

@@ -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) {

View File

@@ -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;
}

View File

@@ -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;
}