Merge remote-tracking branch 'upstream/3.0.1.8' into 3.0.1.7-Gmail
This commit is contained in:
@@ -345,6 +345,12 @@ class ActionsByEmail
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Forward the Mail
|
||||
* @param array $arrayData
|
||||
*
|
||||
* @return string $message
|
||||
*/
|
||||
public function forwardMail(array $arrayData)
|
||||
{
|
||||
if (!isset($arrayData['REQ_UID'])) {
|
||||
@@ -371,7 +377,7 @@ class ActionsByEmail
|
||||
$criteria->addJoin(\AbeRequestsPeer::ABE_UID, \AbeConfigurationPeer::ABE_UID);
|
||||
$criteria->addJoin(\AppDelegationPeer::APP_UID, \AbeRequestsPeer::APP_UID);
|
||||
$criteria->addJoin(\AppDelegationPeer::DEL_INDEX, \AbeRequestsPeer::DEL_INDEX);
|
||||
$resultRes = AbeRequestsPeer::doSelectRS($criteria);
|
||||
$resultRes = \AbeRequestsPeer::doSelectRS($criteria);
|
||||
$resultRes->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$resultRes->next();
|
||||
@@ -381,37 +387,20 @@ class ActionsByEmail
|
||||
if (is_null($dataRes['DEL_FINISH_DATE'])) {
|
||||
\G::LoadClass('spool');
|
||||
|
||||
$configuration = new \Configuration();
|
||||
$sDelimiter = \DBAdapter::getStringDelimiter();
|
||||
$criteria = new \Criteria('workflow');
|
||||
$criteria->add(\ConfigurationPeer::CFG_UID, 'Emails');
|
||||
$criteria->add(\ConfigurationPeer::OBJ_UID, '');
|
||||
$criteria->add(\ConfigurationPeer::PRO_UID, '');
|
||||
$criteria->add(\ConfigurationPeer::USR_UID, '');
|
||||
$criteria->add(\ConfigurationPeer::APP_UID, '');
|
||||
$emailServer = new \ProcessMaker\BusinessModel\EmailServer();
|
||||
$criteria = $emailServer->getEmailServerCriteria();
|
||||
$rsCriteria = \EmailServerPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
if ($rsCriteria->next()) {
|
||||
$row = $rsCriteria->getRow();
|
||||
|
||||
if (\ConfigurationPeer::doCount($criteria) == 0) {
|
||||
$configuration->create(array('CFG_UID' => 'Emails', 'OBJ_UID' => '', 'CFG_VALUE' => '', 'PRO_UID' => '', 'USR_UID' => '', 'APP_UID' => ''));
|
||||
$newConfiguration = array();
|
||||
} else {
|
||||
$newConfiguration = $configuration->load('Emails', '', '', '', '');
|
||||
|
||||
if ($newConfiguration['CFG_VALUE'] != '') {
|
||||
$newConfiguration = unserialize($newConfiguration['CFG_VALUE']);
|
||||
} else {
|
||||
$newConfiguration = array();
|
||||
}
|
||||
$arrayConfigAux = $row;
|
||||
$arrayConfigAux["SMTPSecure"] = $row["SMTPSECURE"];
|
||||
}
|
||||
$aSetup = (!empty($arrayConfigAux))? $arrayConfigAux : \System::getEmailConfiguration();
|
||||
|
||||
$spool = new \spoolRun();
|
||||
$spool->setConfig(array(
|
||||
'MESS_ENGINE' => $newConfiguration['MESS_ENGINE'],
|
||||
'MESS_SERVER' => $newConfiguration['MESS_SERVER'],
|
||||
'MESS_PORT' => $newConfiguration['MESS_PORT'],
|
||||
'MESS_ACCOUNT' => $newConfiguration['MESS_ACCOUNT'],
|
||||
'MESS_PASSWORD' => $newConfiguration['MESS_PASSWORD'],
|
||||
'SMTPAuth' => $newConfiguration['MESS_RAUTH']
|
||||
));
|
||||
$spool->setConfig($aSetup);
|
||||
|
||||
$spool->create(array(
|
||||
'msg_uid' => '',
|
||||
@@ -419,7 +408,7 @@ class ActionsByEmail
|
||||
'del_index' => $dataRes['DEL_INDEX'],
|
||||
'app_msg_type' => 'TEST',
|
||||
'app_msg_subject' => $dataRes['ABE_REQ_SUBJECT'],
|
||||
'app_msg_from' => $newConfiguration['MESS_ACCOUNT'],
|
||||
'app_msg_from' => $aSetup['MESS_ACCOUNT'],
|
||||
'app_msg_to' => $dataRes['ABE_REQ_SENT_TO'],
|
||||
'app_msg_body' => $dataRes['ABE_REQ_BODY'],
|
||||
'app_msg_cc' => '',
|
||||
@@ -432,10 +421,10 @@ class ActionsByEmail
|
||||
if ($spool->sendMail()) {
|
||||
$dataRes['ABE_REQ_STATUS'] = 'SENT';
|
||||
|
||||
$message = G::LoadTranslation('ID_EMAIL_RESENT_TO') . ': '. $dataRes['ABE_REQ_SENT_TO'];
|
||||
$message = \G::LoadTranslation('ID_EMAIL_RESENT_TO') . ': '. $dataRes['ABE_REQ_SENT_TO'];
|
||||
} else {
|
||||
$dataRes['ABE_REQ_STATUS'] = 'ERROR';
|
||||
$message = G::LoadTranslation('ID_THERE_PROBLEM_SENDING_EMAIL') . ': '. $dataRes['ABE_REQ_SENT_TO'] . ', ' . G::LoadTranslation('ID_PLEASE_TRY_LATER');
|
||||
$message = \G::LoadTranslation('ID_THERE_PROBLEM_SENDING_EMAIL') . ': '. $dataRes['ABE_REQ_SENT_TO'] . ', ' . G::LoadTranslation('ID_PLEASE_TRY_LATER');
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -455,6 +444,12 @@ class ActionsByEmail
|
||||
return $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the decision from Actions By Email and check if is Bpmn Process
|
||||
* @param array $arrayData
|
||||
*
|
||||
* @return string $message
|
||||
*/
|
||||
public function viewForm(array $arrayData)
|
||||
{
|
||||
//coment
|
||||
@@ -479,51 +474,148 @@ class ActionsByEmail
|
||||
$criteria->add(\AbeRequestsPeer::ABE_REQ_UID, $arrayData['REQ_UID']);
|
||||
$criteria->addJoin(\AbeRequestsPeer::ABE_UID, \AbeConfigurationPeer::ABE_UID);
|
||||
$criteria->addJoin(\AbeResponsesPeer::ABE_REQ_UID, \AbeRequestsPeer::ABE_REQ_UID);
|
||||
$resultRes = AbeRequestsPeer::doSelectRS($criteria);
|
||||
$resultRes = \AbeRequestsPeer::doSelectRS($criteria);
|
||||
$resultRes->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$resultRes->next();
|
||||
$dataRes = Array();
|
||||
$message = \G::LoadTranslation('ID_USER_NOT_RESPONDED_REQUEST');
|
||||
|
||||
if ($dataRes = $resultRes->getRow()) {
|
||||
$_SESSION['CURRENT_DYN_UID'] = trim($dataRes['DYN_UID']);
|
||||
$dynaform = new \Form($dataRes['PRO_UID'] . PATH_SEP . trim($dataRes['DYN_UID']), PATH_DYNAFORM, SYS_LANG, false);
|
||||
$dynaform->mode = 'view';
|
||||
|
||||
if ($dataRes['ABE_RES_DATA'] != '') {
|
||||
$value = unserialize($dataRes['ABE_RES_DATA']);
|
||||
$process = new \Process();
|
||||
$isBpmn = $process->isBpmnProcess($dataRes['PRO_UID']);
|
||||
if($isBpmn) {
|
||||
$message = $this->viewFormBpmn($dataRes);
|
||||
} else {
|
||||
$message = $this->viewFormClassic($dataRes);
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
$dynaform->values = $value;
|
||||
return $message;
|
||||
}
|
||||
|
||||
foreach ($dynaform->fields as $fieldName => $field) {
|
||||
if ($field->type == 'submit') {
|
||||
unset($dynaform->fields[$fieldName]);
|
||||
/**
|
||||
* Get the decision from Actions By Email by Classic dynaform
|
||||
* @param array $dataRes
|
||||
*
|
||||
* @return string $message
|
||||
*/
|
||||
public function viewFormClassic(array $dataRes)
|
||||
{
|
||||
$dynaform = new \Form($dataRes['PRO_UID'] . PATH_SEP . trim($dataRes['DYN_UID']), PATH_DYNAFORM, SYS_LANG, false);
|
||||
$dynaform->mode = 'view';
|
||||
|
||||
if ($dataRes['ABE_RES_DATA'] != '') {
|
||||
$value = unserialize($dataRes['ABE_RES_DATA']);
|
||||
|
||||
if (is_array($value)) {
|
||||
$dynaform->values = $value;
|
||||
|
||||
foreach ($dynaform->fields as $fieldName => $field) {
|
||||
if ($field->type == 'submit') {
|
||||
unset($dynaform->fields[$fieldName]);
|
||||
}
|
||||
}
|
||||
|
||||
$message = $dynaform->render(PATH_CORE . 'templates/xmlform.html', $scriptCode);
|
||||
} else {
|
||||
$response = $dynaform->render(PATH_CORE . 'templates/xmlform.html', $scriptCode);
|
||||
|
||||
$field = $dynaform->fields[$dataRes['ABE_ACTION_FIELD']];
|
||||
$message = '<b>Type: </b>' . $field->type . '<br>';
|
||||
|
||||
switch ($field->type) {
|
||||
case 'dropdown':
|
||||
case 'radiogroup':
|
||||
$message .=$field->label . ' - ';
|
||||
$message .= $field->options[$value];
|
||||
break;
|
||||
case 'yesno':
|
||||
$message .= '<b>' . $field->label . ' </b>- ';
|
||||
$message .= ($value == 1) ? G::loadTranslation('ID_YES') : G::loadTranslation('ID_NO');
|
||||
break;
|
||||
case 'checkbox':
|
||||
$message .= '<b>' . $field->label . '</b> - ';
|
||||
$message .= ($value == 'On') ? G::loadTranslation('ID_CHECK') : G::loadTranslation('ID_UNCHECK');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Return
|
||||
return $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the decision from Actions By Email by BPMN dynaform
|
||||
* @param array $arrayData
|
||||
*
|
||||
* @return string $message
|
||||
*/
|
||||
public function viewFormBpmn(array $dataRes)
|
||||
{
|
||||
$_SESSION['CURRENT_DYN_UID'] = trim($dataRes['DYN_UID']);
|
||||
$configuration['DYN_UID'] = trim($dataRes['DYN_UID']);
|
||||
$configuration['CURRENT_DYNAFORM'] = trim($dataRes['DYN_UID']);
|
||||
$configuration['PRO_UID'] = trim($dataRes['PRO_UID']);
|
||||
|
||||
$criteriaD = new \Criteria();
|
||||
$criteriaD->addSelectColumn(\DynaformPeer::DYN_CONTENT);
|
||||
$criteriaD->addSelectColumn(\DynaformPeer::PRO_UID);
|
||||
$criteriaD->add(\DynaformPeer::DYN_UID, trim($dataRes['DYN_UID']));
|
||||
$resultD = \DynaformPeer::doSelectRS($criteriaD);
|
||||
$resultD->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
$resultD->next();
|
||||
$configuration = $resultD->getRow();
|
||||
|
||||
\G::LoadClass('pmDynaform');
|
||||
$field = new \stdClass();
|
||||
$obj = new \pmDynaform($configuration);
|
||||
|
||||
if ($dataRes['ABE_RES_DATA'] !== '') {
|
||||
$value = unserialize($dataRes['ABE_RES_DATA']);
|
||||
$actionField = str_replace(array('@@','@#','@=','@%','@?','@$'), '', $dataRes['ABE_ACTION_FIELD']);
|
||||
$variables = \G::json_decode($configuration['DYN_CONTENT'], true);
|
||||
if (is_array($value)) {
|
||||
if(isset($variables['items'][0]['items'])) {
|
||||
$fields = $variables['items'][0]['items'];
|
||||
}
|
||||
} else {
|
||||
if(isset($variables['items'][0]['items'])) {
|
||||
$fields = $variables['items'][0]['items'];
|
||||
foreach ($fields as $key => $row) {
|
||||
foreach($row as $var) {
|
||||
if(isset($var['variable'])) {
|
||||
if ($var['variable'] === $actionField) {
|
||||
$field->label = isset($var['label']) ? $var['label'] : '';
|
||||
$field->type = isset($var['type']) ? $var['type'] : '';
|
||||
$values = $var['options'];
|
||||
foreach ($values as $val){
|
||||
$field->options[$val['value']] = $val['value'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$message = $dynaform->render(PATH_CORE . 'templates/xmlform.html', $scriptCode);
|
||||
} else {
|
||||
$response = $dynaform->render(PATH_CORE . 'templates/xmlform.html', $scriptCode);
|
||||
$field = $dynaform->fields[$dataRes['ABE_ACTION_FIELD']];
|
||||
$message = '<b>Type: </b>' . $field->type . '<br>';
|
||||
|
||||
switch ($field->type) {
|
||||
case 'dropdown':
|
||||
case 'radiogroup':
|
||||
$message .=$field->label . ' - ';
|
||||
$message .= $field->options[$value];
|
||||
break;
|
||||
case 'yesno':
|
||||
$message .= '<b>' . $field->label . ' </b>- ';
|
||||
$message .= ($value == 1) ? 'Yes' : 'No';
|
||||
break;
|
||||
case 'checkbox':
|
||||
$message .= '<b>' . $field->label . '</b> - ';
|
||||
$message .= ($value == 'On') ? 'Check' : 'Uncheck';
|
||||
break;
|
||||
}
|
||||
}
|
||||
$message = '';
|
||||
switch ($field->type) {
|
||||
case 'dropdown':
|
||||
case 'radiogroup':
|
||||
case 'radio':
|
||||
$message .= $field->label . ': ';
|
||||
$message .= $field->options[$value];
|
||||
break;
|
||||
case 'yesno':
|
||||
$message .= $field->label . ': ';
|
||||
$message .= ($value == 1) ? G::loadTranslation('ID_YES') : G::loadTranslation('ID_NO');
|
||||
break;
|
||||
case 'checkgroup':
|
||||
case 'checkbox':
|
||||
$message .= $field->label . ': ';
|
||||
$message .= ($value == 'On') ? G::loadTranslation('ID_CHECK') : G::loadTranslation('ID_UNCHECK');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\BusinessModel;
|
||||
|
||||
class BpmnProcess
|
||||
{
|
||||
/**
|
||||
* Update all processes data by project uid
|
||||
* @param $prjUid
|
||||
* @param $data
|
||||
* @throws \PropelException
|
||||
*/
|
||||
public function updateAllProcessesByProject($prjUid, $data)
|
||||
{
|
||||
$oCriteria = new \Criteria();
|
||||
$oCriteria->addSelectColumn(\BpmnProcessPeer::PRO_UID);
|
||||
$oCriteria->add(\BpmnProcessPeer::PRJ_UID, $prjUid);
|
||||
$rs = \BpmnProcessPeer::doSelectRS($oCriteria);
|
||||
$rs->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
if (!empty($data['PRO_UID'])) {
|
||||
unset($data['PRO_UID']);
|
||||
}
|
||||
while ($rs->next()) {
|
||||
$row = $rs->getRow();
|
||||
$project = \BpmnProcessPeer::retrieveByPK($row['PRO_UID']);
|
||||
if (!empty($project)) {
|
||||
$project->fromArray($data, \BasePeer::TYPE_FIELDNAME);
|
||||
$project->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\BusinessModel;
|
||||
|
||||
class BpmnProject
|
||||
{
|
||||
public function update($prj_uid, $data)
|
||||
{
|
||||
$project = \BpmnProjectPeer::retrieveByPK($prj_uid);
|
||||
$project->fromArray($data, \BasePeer::TYPE_FIELDNAME);
|
||||
$project->save();
|
||||
}
|
||||
}
|
||||
@@ -874,24 +874,26 @@ class EmailServer
|
||||
try {
|
||||
$emailServer = \EmailServerPeer::retrieveByPK($emailServerUid);
|
||||
|
||||
$passwd = $arrayData["MESS_PASSWORD"];
|
||||
$passwdDec = \G::decrypt($passwd, "EMAILENCRYPT");
|
||||
$auxPass = explode("hash:", $passwdDec);
|
||||
if (isset($arrayData['MESS_PASSWORD'])) {
|
||||
$passwd = $arrayData['MESS_PASSWORD'];
|
||||
$passwdDec = \G::decrypt($passwd, 'EMAILENCRYPT');
|
||||
$auxPass = explode('hash:', $passwdDec);
|
||||
|
||||
if (count($auxPass) > 1) {
|
||||
if (count($auxPass) == 2) {
|
||||
$passwd = $auxPass[1];
|
||||
} else {
|
||||
array_shift($auxPass);
|
||||
$passwd = implode("", $auxPass);
|
||||
if (count($auxPass) > 1) {
|
||||
if (count($auxPass) == 2) {
|
||||
$passwd = $auxPass[1];
|
||||
} else {
|
||||
array_shift($auxPass);
|
||||
$passwd = implode('', $auxPass);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$arrayData["MESS_PASSWORD"] = $passwd;
|
||||
$arrayData['MESS_PASSWORD'] = $passwd;
|
||||
|
||||
if ($arrayData["MESS_PASSWORD"] != "") {
|
||||
$arrayData["MESS_PASSWORD"] = "hash:" . $arrayData["MESS_PASSWORD"];
|
||||
$arrayData["MESS_PASSWORD"] = \G::encrypt($arrayData["MESS_PASSWORD"], "EMAILENCRYPT");
|
||||
if ($arrayData['MESS_PASSWORD'] != '') {
|
||||
$arrayData['MESS_PASSWORD'] = 'hash:' . $arrayData['MESS_PASSWORD'];
|
||||
$arrayData['MESS_PASSWORD'] = \G::encrypt($arrayData['MESS_PASSWORD'], 'EMAILENCRYPT');
|
||||
}
|
||||
}
|
||||
|
||||
$emailServer->fromArray($arrayData, \BasePeer::TYPE_FIELDNAME);
|
||||
|
||||
@@ -902,30 +902,29 @@ class Light
|
||||
public function postUidUploadFiles($userUid, $app_uid, $request_data)
|
||||
{
|
||||
$response = array();
|
||||
if (count( $request_data ) > 0) {
|
||||
if (is_array($request_data)) {
|
||||
foreach ($request_data as $k => $file) {
|
||||
$indocUid = null;
|
||||
$fieldName = null;
|
||||
$oCase = new \Cases();
|
||||
$DEL_INDEX = $oCase->getCurrentDelegation( $app_uid, $userUid );
|
||||
|
||||
$aFields = array (
|
||||
"APP_UID" => $app_uid,
|
||||
"DEL_INDEX" => $DEL_INDEX,
|
||||
"USR_UID" => $userUid,
|
||||
"DOC_UID" => - 1,
|
||||
"APP_DOC_TYPE" => "ATTACHED",
|
||||
"APP_DOC_CREATE_DATE" => date( "Y-m-d H:i:s" ),
|
||||
"APP_DOC_COMMENT" => "",
|
||||
"APP_DOC_TITLE" => "",
|
||||
"APP_DOC_FILENAME" => $file['name'],
|
||||
"APP_DOC_FIELDNAME" => $fieldName
|
||||
$delIndex = $oCase->getCurrentDelegation($app_uid, $userUid);
|
||||
$docUid = !empty($file['docUid']) ? $file['docUid'] : -1;
|
||||
$appDocType = !empty($file['appDocType']) ? $file['appDocType'] : "ATTACHED";
|
||||
$fieldName = !empty($file['fieldName']) ? $file['fieldName'] : null;
|
||||
$aFields = array(
|
||||
"APP_UID" => $app_uid,
|
||||
"DEL_INDEX" => $delIndex,
|
||||
"USR_UID" => $userUid,
|
||||
"DOC_UID" => $docUid,
|
||||
"APP_DOC_TYPE" => $appDocType,
|
||||
"APP_DOC_CREATE_DATE" => date("Y-m-d H:i:s"),
|
||||
"APP_DOC_COMMENT" => "",
|
||||
"APP_DOC_TITLE" => "",
|
||||
"APP_DOC_FILENAME" => $file['name'],
|
||||
"APP_DOC_FIELDNAME" => $fieldName
|
||||
);
|
||||
|
||||
$oAppDocument = new \AppDocument();
|
||||
$oAppDocument->create( $aFields );
|
||||
$oAppDocument->create($aFields);
|
||||
$response[$k]['docVersion'] = $iDocVersion = $oAppDocument->getDocVersion();
|
||||
$response[$k]['appDocUid'] = $sAppDocUid = $oAppDocument->getAppDocUid();
|
||||
$response[$k]['appDocUid'] = $sAppDocUid = $oAppDocument->getAppDocUid();
|
||||
}
|
||||
}
|
||||
return $response;
|
||||
|
||||
@@ -562,6 +562,12 @@ class Process
|
||||
$this->throwExceptionIfNotExistsUser($arrayData["PRO_CREATE_USER"], $this->arrayFieldNameForException["processCreateUser"]);
|
||||
}
|
||||
|
||||
//Update name in table Bpmn_Project and Bpmn_Process
|
||||
$oProject = new BpmnProject();
|
||||
$oProject->update($processUid, array('PRJ_NAME'=>$arrayData['PRO_TITLE']));
|
||||
$oProcess = new BpmnProcess();
|
||||
//The relationship Bpmn_Project with Bpmn_Process is 1:n
|
||||
$oProcess->updateAllProcessesByProject($processUid, array('PRO_NAME'=>$arrayData['PRO_TITLE']));
|
||||
//Update
|
||||
$process = new \Process();
|
||||
|
||||
|
||||
@@ -12,6 +12,11 @@ abstract class Importer
|
||||
protected $filename = "";
|
||||
protected $saveDir = "";
|
||||
protected $metadata = array();
|
||||
/**
|
||||
* Title of the process before being updated/deleted.
|
||||
* @var string
|
||||
*/
|
||||
protected $currentProcessTitle = "";
|
||||
public static $affectedGroups = array();
|
||||
|
||||
const IMPORT_OPTION_OVERWRITE = "project.import.override";
|
||||
@@ -165,7 +170,7 @@ abstract class Importer
|
||||
case self::IMPORT_OPTION_OVERWRITE:
|
||||
//Shouldn't generate new UID for all objects
|
||||
$this->removeProject();
|
||||
|
||||
$name = $this->currentProcessTitle;
|
||||
$generateUid = false;
|
||||
break;
|
||||
case self::IMPORT_OPTION_DISABLE_AND_CREATE_NEW:
|
||||
@@ -278,6 +283,10 @@ abstract class Importer
|
||||
|
||||
public function removeProject()
|
||||
{
|
||||
/* @var $process \Process */
|
||||
$process = new \Process();
|
||||
$process->load($this->metadata["uid"]);
|
||||
$this->currentProcessTitle = $process->getProTitle();
|
||||
$project = \ProcessMaker\Project\Adapter\BpmnWorkflow::load($this->metadata["uid"]);
|
||||
$project->remove(true, false);
|
||||
}
|
||||
|
||||
@@ -189,6 +189,7 @@ class Light extends Api
|
||||
'DEL_TASK_DUE_DATE' => 'dueDate',
|
||||
'DEL_INDEX' => 'delIndex',
|
||||
'DEL_DELEGATE_DATE' => 'delegateDate',
|
||||
'DEL_RISK_DATE' => 'delRiskDate',
|
||||
'user' => array(
|
||||
'USR_UID' => 'userId'
|
||||
),
|
||||
|
||||
@@ -236,10 +236,14 @@ class Server implements iAuthenticate
|
||||
*
|
||||
* @format JsonFormat,UploadFormat
|
||||
*/
|
||||
public function postAuthorize($authorize = null, $userId = null, $returnResponse = false)
|
||||
public function postAuthorize($authorize = null, $userId = null, $returnResponse = false, $cacheSessionValue = array())
|
||||
{
|
||||
@session_start();
|
||||
|
||||
foreach ($cacheSessionValue as $key => $value) {
|
||||
$_SESSION[$key] = $value;
|
||||
}
|
||||
|
||||
if (! isset($_SESSION['USER_LOGGED'])) {
|
||||
throw new RestException(400, "Local Authentication Error, user session is not started.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user