Upgrade PHP files
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user