HOR-3700-RG
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Util\ParseSoapVariableName;
|
||||
|
||||
ini_set("soap.wsdl_cache_enabled", 0); //disabling WSDL cache
|
||||
@@ -13,8 +14,7 @@ function login ($params)
|
||||
$ws = new WsBase();
|
||||
$res = $ws->login($params->userid, $params->password);
|
||||
|
||||
return array ('status_code' => $res->status_code,'message' => $res->message,'version' => WEB_SERVICE_VERSION,'timestamp' => $res->timestamp
|
||||
);
|
||||
return array('status_code' => $res->status_code, 'message' => $res->message, 'version' => WEB_SERVICE_VERSION, 'timestamp' => $res->timestamp);
|
||||
}
|
||||
|
||||
function ProcessList($params)
|
||||
@@ -25,31 +25,27 @@ function ProcessList ($params)
|
||||
$o->guid = $vsResult->status_code . ' ' . $vsResult->message;
|
||||
$o->name = '';
|
||||
|
||||
return array ("processes" => $o
|
||||
);
|
||||
return array("processes" => $o);
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') != 0) {
|
||||
$ws = new WsBase();
|
||||
$res = $ws->processList();
|
||||
|
||||
return array ("processes" => $res
|
||||
);
|
||||
return array("processes" => $res);
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_FACTORY') == 0) {
|
||||
$o->guid = "2" . G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
|
||||
$o->name = '';
|
||||
|
||||
return array ("processes" => $o
|
||||
);
|
||||
return array("processes" => $o);
|
||||
}
|
||||
|
||||
/**
|
||||
* if you are not an admin user, then this function will return only your valid process *
|
||||
*/
|
||||
if (ifPermission($params->sessionId, 'PM_FACTORY') == 0) {
|
||||
|
||||
$oSessions = new Sessions();
|
||||
$session = $oSessions->getSessionUser($params->sessionId);
|
||||
$userId = $session['USR_UID'];
|
||||
@@ -57,15 +53,13 @@ function ProcessList ($params)
|
||||
$ws = new WsBase();
|
||||
$res = $ws->processListVerified($userId);
|
||||
|
||||
return array ("processes" => $res
|
||||
);
|
||||
return array("processes" => $res);
|
||||
}
|
||||
|
||||
$ws = new WsBase();
|
||||
$res = $ws->processList();
|
||||
|
||||
return array ("processes" => $res
|
||||
);
|
||||
return array("processes" => $res);
|
||||
}
|
||||
|
||||
function RoleList($params)
|
||||
@@ -76,23 +70,20 @@ function RoleList ($params)
|
||||
$o->guid = $vsResult->status_code . ' ' . $vsResult->message;
|
||||
$o->name = '';
|
||||
|
||||
return array ("roles" => $o
|
||||
);
|
||||
return array("roles" => $o);
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_USERS') == 0) {
|
||||
$o->guid = "2" . G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
|
||||
$o->name = '';
|
||||
|
||||
return array ("roles" => $o
|
||||
);
|
||||
return array("roles" => $o);
|
||||
}
|
||||
|
||||
$ws = new WsBase();
|
||||
$res = $ws->roleList();
|
||||
|
||||
return array ("roles" => $res
|
||||
);
|
||||
return array("roles" => $res);
|
||||
}
|
||||
|
||||
function GroupList($params)
|
||||
@@ -103,23 +94,20 @@ function GroupList ($params)
|
||||
$o->guid = $vsResult->status_code . ' ' . $vsResult->message;
|
||||
$o->name = '';
|
||||
|
||||
return array ("groups" => $o
|
||||
);
|
||||
return array("groups" => $o);
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_USERS') == 0) {
|
||||
$o->guid = "2" . G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
|
||||
$o->name = '';
|
||||
|
||||
return array ("groups" => $o
|
||||
);
|
||||
return array("groups" => $o);
|
||||
}
|
||||
|
||||
$ws = new WsBase();
|
||||
$res = $ws->groupList();
|
||||
|
||||
return array ("groups" => $res
|
||||
);
|
||||
return array("groups" => $res);
|
||||
}
|
||||
|
||||
function DepartmentList($params)
|
||||
@@ -130,23 +118,20 @@ function DepartmentList ($params)
|
||||
$o->guid = $vsResult->status_code . ' ' . $vsResult->message;
|
||||
$o->name = '';
|
||||
|
||||
return array ("departments" => $o
|
||||
);
|
||||
return array("departments" => $o);
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_USERS') == 0) {
|
||||
$o->guid = "2" . G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
|
||||
$o->name = '';
|
||||
|
||||
return array ("departments" => $o
|
||||
);
|
||||
return array("departments" => $o);
|
||||
}
|
||||
|
||||
$ws = new WsBase();
|
||||
$res = $ws->departmentList();
|
||||
|
||||
return array ("departments" => $res
|
||||
);
|
||||
return array("departments" => $res);
|
||||
}
|
||||
|
||||
function CaseList($params)
|
||||
@@ -160,8 +145,7 @@ function CaseList ($params)
|
||||
$o->delIndex = '';
|
||||
$o->processId = '';
|
||||
|
||||
return array ("cases" => $o
|
||||
);
|
||||
return array("cases" => $o);
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
@@ -171,8 +155,7 @@ function CaseList ($params)
|
||||
$o->delIndex = '';
|
||||
$o->processId = '';
|
||||
|
||||
return array ("cases" => $o
|
||||
);
|
||||
return array("cases" => $o);
|
||||
}
|
||||
|
||||
$oSessions = new Sessions();
|
||||
@@ -182,8 +165,7 @@ function CaseList ($params)
|
||||
$ws = new WsBase();
|
||||
$res = $ws->caseList($userId);
|
||||
|
||||
return array ("cases" => $res
|
||||
);
|
||||
return array("cases" => $res);
|
||||
}
|
||||
|
||||
function UnassignedCaseList($params)
|
||||
@@ -194,8 +176,7 @@ function UnassignedCaseList ($params)
|
||||
$o->name = '';
|
||||
$o->delIndex = '';
|
||||
|
||||
return array ("cases" => $o
|
||||
);
|
||||
return array("cases" => $o);
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
@@ -203,8 +184,7 @@ function UnassignedCaseList ($params)
|
||||
$o->name = '';
|
||||
$o->delIndex = '';
|
||||
|
||||
return array ("cases" => $o
|
||||
);
|
||||
return array("cases" => $o);
|
||||
}
|
||||
|
||||
$oSessions = new Sessions();
|
||||
@@ -214,8 +194,7 @@ function UnassignedCaseList ($params)
|
||||
$ws = new WsBase();
|
||||
$res = $ws->unassignedCaseList($userId);
|
||||
|
||||
return array ("cases" => $res
|
||||
);
|
||||
return array("cases" => $res);
|
||||
}
|
||||
|
||||
function UserList($params)
|
||||
@@ -226,23 +205,20 @@ function UserList ($params)
|
||||
$o->guid = $vsResult->status_code . ' ' . $vsResult->message;
|
||||
$o->name = '';
|
||||
|
||||
return array ("users" => $o
|
||||
);
|
||||
return array("users" => $o);
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_USERS') == 0) {
|
||||
$o->guid = "2" . G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
|
||||
$o->name = '';
|
||||
|
||||
return array ("users" => $o
|
||||
);
|
||||
return array("users" => $o);
|
||||
}
|
||||
|
||||
$ws = new WsBase();
|
||||
$res = $ws->userList();
|
||||
|
||||
return array ("users" => $res
|
||||
);
|
||||
return array("users" => $res);
|
||||
}
|
||||
|
||||
function triggerList($params)
|
||||
@@ -254,8 +230,7 @@ function triggerList ($params)
|
||||
$o->name = '';
|
||||
$o->processId = '';
|
||||
|
||||
return array ("triggers" => $o
|
||||
);
|
||||
return array("triggers" => $o);
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
@@ -263,15 +238,13 @@ function triggerList ($params)
|
||||
$o->name = '';
|
||||
$o->processId = '';
|
||||
|
||||
return array ("triggers" => $o
|
||||
);
|
||||
return array("triggers" => $o);
|
||||
}
|
||||
|
||||
$ws = new WsBase();
|
||||
$res = $ws->triggerList();
|
||||
|
||||
return array ("triggers" => $res
|
||||
);
|
||||
return array("triggers" => $res);
|
||||
}
|
||||
|
||||
function outputDocumentList($params)
|
||||
@@ -289,8 +262,7 @@ function outputDocumentList ($params)
|
||||
$o->index = '';
|
||||
$o->link = '';
|
||||
|
||||
return array ("documents" => $o
|
||||
);
|
||||
return array("documents" => $o);
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
@@ -304,8 +276,7 @@ function outputDocumentList ($params)
|
||||
$o->index = '';
|
||||
$o->link = '';
|
||||
|
||||
return array ("documents" => $o
|
||||
);
|
||||
return array("documents" => $o);
|
||||
}
|
||||
|
||||
$oSessions = new Sessions();
|
||||
@@ -315,8 +286,7 @@ function outputDocumentList ($params)
|
||||
$ws = new WsBase();
|
||||
$res = $ws->outputDocumentList($params->caseId, $userId);
|
||||
|
||||
return array ("documents" => $res
|
||||
);
|
||||
return array("documents" => $res);
|
||||
}
|
||||
|
||||
function inputDocumentList($params)
|
||||
@@ -334,8 +304,7 @@ function inputDocumentList ($params)
|
||||
$o->index = '';
|
||||
$o->link = '';
|
||||
|
||||
return array ("documents" => $o
|
||||
);
|
||||
return array("documents" => $o);
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
@@ -349,8 +318,7 @@ function inputDocumentList ($params)
|
||||
$o->index = '';
|
||||
$o->link = '';
|
||||
|
||||
return array ("documents" => $o
|
||||
);
|
||||
return array("documents" => $o);
|
||||
}
|
||||
|
||||
$oSessions = new Sessions();
|
||||
@@ -360,8 +328,7 @@ function inputDocumentList ($params)
|
||||
$ws = new WsBase();
|
||||
$res = $ws->inputDocumentList($params->caseId, $userId);
|
||||
|
||||
return array ("documents" => $res
|
||||
);
|
||||
return array("documents" => $res);
|
||||
}
|
||||
|
||||
function inputDocumentProcessList($params)
|
||||
@@ -373,8 +340,7 @@ function inputDocumentProcessList ($params)
|
||||
$o->name = '';
|
||||
$o->description = '';
|
||||
|
||||
return array ("documents" => $o
|
||||
);
|
||||
return array("documents" => $o);
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
@@ -382,15 +348,13 @@ function inputDocumentProcessList ($params)
|
||||
$o->name = '';
|
||||
$o->description = '';
|
||||
|
||||
return array ("documents" => $o
|
||||
);
|
||||
return array("documents" => $o);
|
||||
}
|
||||
|
||||
$ws = new WsBase();
|
||||
$res = $ws->inputDocumentProcessList($params->processId);
|
||||
|
||||
return array ("documents" => $res
|
||||
);
|
||||
return array("documents" => $res);
|
||||
}
|
||||
|
||||
function removeDocument($params)
|
||||
@@ -402,7 +366,7 @@ function removeDocument ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -422,7 +386,7 @@ function SendMessage ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result->getPayloadArray();
|
||||
}
|
||||
@@ -442,7 +406,7 @@ function getCaseInfo ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -462,7 +426,7 @@ function SendVariables ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -490,8 +454,7 @@ function SendVariables ($params)
|
||||
function GetVariables($params)
|
||||
{
|
||||
if (!is_array($params->variables)) {
|
||||
$params->variables = array ($params->variables
|
||||
);
|
||||
$params->variables = array($params->variables);
|
||||
}
|
||||
|
||||
$vsResult = isValidSession($params->sessionId);
|
||||
@@ -515,7 +478,6 @@ function GetVariables ($params)
|
||||
|
||||
function GetVariablesNames($params)
|
||||
{
|
||||
|
||||
$vsResult = isValidSession($params->sessionId);
|
||||
|
||||
if ($vsResult->status_code !== 0) {
|
||||
@@ -546,7 +508,7 @@ function DerivateCase ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -573,7 +535,7 @@ function RouteCase ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -588,7 +550,6 @@ function RouteCase ($params)
|
||||
$res = $ws->derivateCase($user["USR_UID"], $params->caseId, $params->delIndex, true);
|
||||
|
||||
return $res;
|
||||
|
||||
}
|
||||
|
||||
function executeTrigger($params)
|
||||
@@ -600,7 +561,7 @@ function executeTrigger ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -624,7 +585,7 @@ function NewCaseImpersonate ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, "PM_CASES") == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -681,7 +642,7 @@ function NewCase($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
$result = new wsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -731,7 +692,7 @@ function AssignUserToGroup ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_USERS') == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result->getPayloadArray();
|
||||
}
|
||||
@@ -740,7 +701,7 @@ function AssignUserToGroup ($params)
|
||||
$user = $sessions->getSessionUser($params->sessionId);
|
||||
|
||||
if (!is_array($user)) {
|
||||
return new wsResponse( 3, 'User not registered in the system' );
|
||||
return new WsResponse(3, 'User not registered in the system');
|
||||
}
|
||||
|
||||
$ws = new WsBase();
|
||||
@@ -758,7 +719,7 @@ function AssignUserToDepartment ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_USERS') == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result->getPayloadArray();
|
||||
}
|
||||
@@ -767,7 +728,7 @@ function AssignUserToDepartment ($params)
|
||||
$user = $sessions->getSessionUser($params->sessionId);
|
||||
|
||||
if (!is_array($user)) {
|
||||
return new wsResponse( 3, G::LoadTranslation('ID_USER_NOT_REGISTERED_SYSTEM') );
|
||||
return new WsResponse(3, G::LoadTranslation('ID_USER_NOT_REGISTERED_SYSTEM'));
|
||||
}
|
||||
|
||||
$ws = new WsBase();
|
||||
@@ -810,7 +771,7 @@ function updateUser ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, "PM_USERS") == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -831,7 +792,7 @@ function informationUser($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, "PM_USERS") == 0) {
|
||||
$result = new wsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -892,16 +853,14 @@ function TaskList ($params)
|
||||
$o->guid = $vsResult->status_code . ' ' . $vsResult->message;
|
||||
$o->name = '';
|
||||
|
||||
return array ("tasks" => $o
|
||||
);
|
||||
return array("tasks" => $o);
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
$o->guid = "2" . G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
|
||||
$o->name = '';
|
||||
|
||||
return array ("tasks" => $o
|
||||
);
|
||||
return array("tasks" => $o);
|
||||
}
|
||||
|
||||
$ws = new WsBase();
|
||||
@@ -910,8 +869,7 @@ function TaskList ($params)
|
||||
$userId = $session['USR_UID'];
|
||||
$res = $ws->taskList($userId);
|
||||
|
||||
return array ("tasks" => $res
|
||||
);
|
||||
return array("tasks" => $res);
|
||||
}
|
||||
|
||||
function TaskCase($params)
|
||||
@@ -922,23 +880,20 @@ function TaskCase ($params)
|
||||
$o->guid = $vsResult->status_code . ' ' . $vsResult->message;
|
||||
$o->name = '';
|
||||
|
||||
return array ("taskCases" => $o
|
||||
);
|
||||
return array("taskCases" => $o);
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
$o->guid = "2" . G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
|
||||
$o->name = '';
|
||||
|
||||
return array ("taskCases" => $o
|
||||
);
|
||||
return array("taskCases" => $o);
|
||||
}
|
||||
|
||||
$ws = new WsBase();
|
||||
$res = $ws->taskCase($params->caseId);
|
||||
|
||||
return array ("taskCases" => $res
|
||||
);
|
||||
return array("taskCases" => $res);
|
||||
}
|
||||
|
||||
function ReassignCase($params)
|
||||
@@ -993,9 +948,9 @@ function isValidSession ($sessionId)
|
||||
$session = $oSessions->verifySession($sessionId);
|
||||
|
||||
if (is_array($session)) {
|
||||
return new wsResponse( 0, G::LoadTranslation('ID_SESSION_ACTIVE') );
|
||||
return new WsResponse(0, G::LoadTranslation('ID_SESSION_ACTIVE'));
|
||||
} else {
|
||||
return new wsResponse( 9, G::LoadTranslation('ID_SESSION_EXPIRED') );
|
||||
return new WsResponse(9, G::LoadTranslation('ID_SESSION_EXPIRED'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1047,7 +1002,7 @@ function deleteCase ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, "PM_CASES") == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -1067,7 +1022,7 @@ function cancelCase ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, "PM_CASES") == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -1087,7 +1042,7 @@ function pauseCase ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, "PM_CASES") == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -1108,7 +1063,7 @@ function unpauseCase ($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, "PM_CASES") == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -1128,19 +1083,14 @@ function addCaseNote($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, "PM_CASES") == 0) {
|
||||
$result = new wsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
$ws = new WsBase();
|
||||
$result = $ws->addCaseNote(
|
||||
$params->caseUid,
|
||||
$params->processUid,
|
||||
$params->taskUid,
|
||||
$params->userUid,
|
||||
$params->note,
|
||||
(isset($params->sendMail))? $params->sendMail : 1
|
||||
$params->caseUid, $params->processUid, $params->taskUid, $params->userUid, $params->note, (isset($params->sendMail)) ? $params->sendMail : 1
|
||||
);
|
||||
|
||||
return $result;
|
||||
@@ -1154,7 +1104,7 @@ function claimCase($params)
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
$result = new wsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
$result = new WsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -1167,7 +1117,6 @@ function claimCase($params)
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
$options = array(
|
||||
'cache_wsdl' => WSDL_CACHE_NONE
|
||||
);
|
||||
@@ -1216,4 +1165,3 @@ $server->addFunction("unpauseCase");
|
||||
$server->addFunction("addCaseNote");
|
||||
$server->addFunction("claimCase");
|
||||
$server->handle();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user