Merged in release/3.6.5 (pull request #7923)

release/3.6.5

Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
Paula Quispe
2021-05-11 18:34:09 +00:00
committed by Julio Cesar Laura Avendaño
10 changed files with 88 additions and 85 deletions

View File

@@ -239,6 +239,11 @@ class Applications
return $result;
}
/**
* Function for get all cases
*
* @deprecated Class deprecated in Release 3.6.x
*/
public function getAll(
$userUid,
$start = null,

View File

@@ -1,33 +1,8 @@
<?php
/**
* AppCacheView.php
* @package workflow.engine.classes.model
*/
//require_once ('classes/model/om/BaseAppCacheView.php');
/**
* Skeleton subclass for representing a row from the 'APP_CACHE_VIEW' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
*/
//require_once ('classes/model/Application.php');
//require_once ('classes/model/AppDelegation.php');
//require_once ('classes/model/AppDelay.php');
//require_once ('classes/model/Task.php');
//require_once ('classes/model/AdditionalTables.php');
/**
* @package workflow.engine.classes.model
* @access public
* @deprecated Class deprecated in Release 3.6.x
*/
class AppCacheView extends BaseAppCacheView
{

View File

@@ -1,8 +1,4 @@
<?php
/**
* AppCacheViewPeer.php
* @package workflow.engine.classes.model
*/
// include base peer class
require_once 'classes/model/om/BaseAppCacheViewPeer.php';
@@ -10,17 +6,9 @@
// include object class
include_once 'classes/model/AppCacheView.php';
/**
* Skeleton subclass for performing query and update operations on the 'APP_CACHE_VIEW' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package workflow.engine.classes.model
* AppCacheViewPeer.php
* @deprecated Class deprecated in Release 3.6.x
*/
class AppCacheViewPeer extends BaseAppCacheViewPeer
{

View File

@@ -2,6 +2,9 @@
use Illuminate\Support\Facades\DB;
/**
* @deprecated Class deprecated in Release 3.6.x
*/
class Content extends BaseContent
{
public $langs;

View File

@@ -1,46 +1,7 @@
<?php
/**
* ContentPeer.php
* @package workflow.engine.classes.model
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
// include base peer class
//require_once 'classes/model/om/BaseContentPeer.php';
// include object class
//include_once 'classes/model/Content.php';
/**
* Skeleton subclass for performing query and update operations on the 'CONTENT' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package workflow.engine.classes.model
* @deprecated Class deprecated in Release 3.6.x
*/
class ContentPeer extends BaseContentPeer
{

View File

@@ -5,6 +5,7 @@
* @link https://wiki.processmaker.com/3.3/Actions_by_Email#Link_to_Fill_a_Form
*/
use App\Jobs\ActionByEmail;
use ProcessMaker\BusinessModel\Cases as BmCases;
use ProcessMaker\Core\JobsManager;
use ProcessMaker\Validation\ValidationUploadedFiles;
@@ -56,6 +57,15 @@ if ($featureEnable) {
$remoteAddr = $_SERVER['REMOTE_ADDR'];
$files = $_FILES;
// Delete the MultipleFile
if (array_key_exists('__VARIABLE_DOCUMENT_DELETE__', $_POST['form'])) {
if (is_array($_POST['form']['__VARIABLE_DOCUMENT_DELETE__']) && !empty($_POST['form']['__VARIABLE_DOCUMENT_DELETE__'])) {
$documentsToDelete = $_POST['form']['__VARIABLE_DOCUMENT_DELETE__'];
$case = new BmCases();
$case->deleteMultipleFile($appUid, $documentsToDelete);
}
}
//Now we dispatch the derivation of the case through Jobs Laravel.
$closure = function() use ($appUid, $delIndex, $aber, $dynUid, $forms, $remoteAddr, $files) {
$cases = new Cases();

View File

@@ -1,5 +1,6 @@
<?php
use ProcessMaker\Core\System;
use ProcessMaker\Util\ParseSoapVariableName;
use ProcessMaker\Util\DateTime;
@@ -10,6 +11,25 @@ define('WEB_SERVICE_VERSION', '2.0');
//$wsdl = PATH_METHODS . "services" . PATH_SEP . "pmos.wsdl";
$wsdl = PATH_METHODS . "services" . PATH_SEP . "pmos2.wsdl";
/**
* Sets the user's timezone in the session variable
*
* @param string $userUid
* @return void
*/
function setUserTimezone($userUid)
{
$user = UsersPeer::retrieveByPK($userUid);
if (!is_null($user)) {
$userTimeZone = $user->getUsrTimeZone();
if (trim($userTimeZone) === '') {
$arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace"));
$userTimeZone = $arraySystemConfiguration['time_zone'];
}
$_SESSION['USR_TIME_ZONE'] = $userTimeZone;
}
}
function login($params)
{
$ws = new WsBase();
@@ -51,6 +71,8 @@ function ProcessList($params)
$session = $oSessions->getSessionUser($params->sessionId);
$userId = $session['USR_UID'];
setUserTimezone($userId);
$ws = new WsBase();
$res = $ws->processListVerified($userId);
@@ -162,6 +184,8 @@ function CaseList($params)
$oSessions = new Sessions();
$session = $oSessions->getSessionUser($params->sessionId);
$userId = $session['USR_UID'];
setUserTimezone($userId);
$ws = new WsBase();
$res = $ws->caseList($userId);
@@ -192,6 +216,8 @@ function UnassignedCaseList($params)
$session = $oSessions->getSessionUser($params->sessionId);
$userId = $session['USR_UID'];
setUserTimezone($userId);
$ws = new WsBase();
$res = $ws->unassignedCaseList($userId);
@@ -284,6 +310,8 @@ function outputDocumentList($params)
$session = $oSessions->getSessionUser($params->sessionId);
$userId = $session['USR_UID'];
setUserTimezone($userId);
$ws = new WsBase();
$res = $ws->outputDocumentList($params->caseId, $userId);
@@ -326,6 +354,8 @@ function inputDocumentList($params)
$session = $oSessions->getSessionUser($params->sessionId);
$userId = $session['USR_UID'];
setUserTimezone($userId);
$ws = new WsBase();
$res = $ws->inputDocumentList($params->caseId, $userId);
@@ -541,6 +571,8 @@ function DerivateCase($params)
$oStd->stored_system_variables = true;
$oStd->wsSessionId = $params->sessionId;
setUserTimezone($user["USR_UID"]);
$ws = new WsBase($oStd);
$res = $ws->derivateCase($user["USR_UID"], $params->caseId, $params->delIndex, true);
@@ -569,6 +601,8 @@ function RouteCase($params)
$oStd->stored_system_variables = true;
$oStd->wsSessionId = $params->sessionId;
setUserTimezone($user["USR_UID"]);
$ws = new WsBase($oStd);
$res = $ws->derivateCase($user["USR_UID"], $params->caseId, $params->delIndex, true);
@@ -592,6 +626,8 @@ function executeTrigger($params)
$oSession = new Sessions();
$user = $oSession->getSessionUser($params->sessionId);
setUserTimezone($user["USR_UID"]);
$ws = new WsBase();
$delIndex = (isset($params->delIndex)) ? $params->delIndex : 1;
$res = $ws->executeTrigger($user['USR_UID'], $params->caseId, $params->triggerIndex, $delIndex);
@@ -696,6 +732,8 @@ function NewCase($params)
$params->variables = $field;
setUserTimezone($userId);
$ws = new WsBase();
$res = $ws->newCase($params->processId, $userId, $params->taskId, $params->variables, (isset($params->executeTriggers)) ? (int) ($params->executeTriggers) : 0);
@@ -727,6 +765,8 @@ function AssignUserToGroup($params)
return new WsResponse(3, 'User not registered in the system');
}
setUserTimezone($user["USR_UID"]);
$ws = new WsBase();
$res = $ws->assignUserToGroup($params->userId, $params->groupId);
@@ -754,6 +794,8 @@ function AssignUserToDepartment($params)
return new WsResponse(3, G::LoadTranslation('ID_USER_NOT_REGISTERED_SYSTEM'));
}
setUserTimezone($user["USR_UID"]);
$ws = new WsBase();
$res = $ws->AssignUserToDepartment($params->userId, $params->departmentId, $params->manager);
@@ -799,6 +841,8 @@ function updateUser($params)
return $result;
}
setUserTimezone($params->userUid);
$ws = new WsBase();
$result = $ws->updateUser($params->userUid, $params->userName, ((isset($params->firstName)) ? $params->firstName : null), ((isset($params->lastName)) ? $params->lastName : null), ((isset($params->email)) ? $params->email : null), ((isset($params->dueDate)) ? $params->dueDate : null), ((isset($params->status)) ? $params->status : null), ((isset($params->role)) ? $params->role : null), ((isset($params->password)) ? $params->password : null));
@@ -820,6 +864,8 @@ function informationUser($params)
return $result;
}
setUserTimezone($params->userUid);
$ws = new WsBase();
$result = $ws->informationUser($params->userUid);
@@ -890,6 +936,7 @@ function TaskList($params)
$oSessions = new Sessions();
$session = $oSessions->getSessionUser($params->sessionId);
$userId = $session['USR_UID'];
setUserTimezone($userId);
$res = $ws->taskList($userId);
return array("tasks" => $res);
@@ -961,6 +1008,8 @@ function getCaseNotes($params)
return $vsResult;
}
setUserTimezone($params->userUid);
$ws = new WsBase();
$res = $ws->getCaseNotes($params->applicationID, $params->userUid);
@@ -1014,6 +1063,8 @@ function ifPermission($sessionId, $permission)
$oSession = new Sessions();
$user = $oSession->getSessionUser($sessionId);
setUserTimezone($user["USR_UID"]);
$oRBAC = RBAC::getSingleton();
$oRBAC->loadUserRolePermission($oRBAC->sSystem, $user['USR_UID']);
$sw = $oRBAC->userCanAccess($permission) === 1 ? 1 : 0;
@@ -1055,6 +1106,8 @@ function cancelCase($params)
return $result;
}
setUserTimezone($params->userUid);
$ws = new WsBase();
$result = $ws->cancelCase($params->caseUid, $params->delIndex, $params->userUid);
@@ -1075,6 +1128,8 @@ function pauseCase($params)
return $result;
}
setUserTimezone($params->userUid);
$ws = new WsBase();
$result = $ws->pauseCase($params->caseUid, $params->delIndex, $params->userUid, ((isset($params->unpauseDate)) ? $params->unpauseDate : null));
@@ -1096,6 +1151,8 @@ function unpauseCase($params)
return $result;
}
setUserTimezone($params->userUid);
$ws = new WsBase();
$result = $ws->unpauseCase($params->caseUid, $params->delIndex, $params->userUid);
@@ -1116,6 +1173,8 @@ function addCaseNote($params)
return $result;
}
setUserTimezone($params->userUid);
$ws = new WsBase();
$result = $ws->addCaseNote(
$params->caseUid, $params->processUid, $params->taskUid, $params->userUid, $params->note, (isset($params->sendMail)) ? $params->sendMail : 1
@@ -1140,6 +1199,8 @@ function claimCase($params)
$oSessions = new Sessions();
$session = $oSessions->getSessionUser($params->sessionId);
setUserTimezone($session["USR_UID"]);
$ws = new WsBase();
$res = $ws->claimCase($session['USR_UID'], $params->guid, $params->delIndex);

View File

@@ -7,10 +7,10 @@
<THEDESCRIPTION type="title" label="@#DESCRIPTION" enableHtml="1">
<en><![CDATA[@#DESCRIPTION]]></en>
</THEDESCRIPTION>
<USR_PASSWORD type="password" size="30" maxlength="32">
<USR_PASSWORD type="password" size="30" maxlength="100">
<en><![CDATA[Password]]></en>
</USR_PASSWORD>
<USR_PASSWORD_CONFIRM type="password" size="30" maxlength="32">
<USR_PASSWORD_CONFIRM type="password" size="30" maxlength="100">
<en><![CDATA[Re-Type Password]]></en>
</USR_PASSWORD_CONFIRM>
<__USR_PASSWORD_CHANGE__ type="hidden"/>

View File

@@ -11,7 +11,7 @@
<USR_PASSWORD type="text" size="30" maxlength="32" autocomplete="0">
<en><![CDATA[Password]]></en>
</USR_PASSWORD>
<USR_PASSWORD_MASK type="password" size="30" maxlength="32" autocomplete="0">
<USR_PASSWORD_MASK type="password" size="30" maxlength="100" autocomplete="0">
<en><![CDATA[Password]]></en>
</USR_PASSWORD_MASK>
<USER_LANG type="dropdown" sqlconnection="dbarray">

View File

@@ -11,7 +11,7 @@
<USR_PASSWORD type="hidden" size="30" maxlength="32" autocomplete="0">
<en><![CDATA[Password]]></en>
</USR_PASSWORD>
<USR_PASSWORD_MASK type="password" size="30" maxlength="32" autocomplete="0">
<USR_PASSWORD_MASK type="password" size="30" maxlength="100" autocomplete="0">
<en><![CDATA[Password]]></en>
</USR_PASSWORD_MASK>
<USER_ENV type="text" size="30" maxlength="50" autocomplete="0">