solve conflicts
This commit is contained in:
@@ -574,8 +574,10 @@ class adminProxy extends HttpProxyController
|
||||
}
|
||||
|
||||
/**
|
||||
* for send email configuration
|
||||
* @autor Alvaro <alvaro@colosa.com>
|
||||
* For test email configuration
|
||||
* @return stdClass()
|
||||
*
|
||||
* @see adminProxy->testConnection()
|
||||
*/
|
||||
public function sendTestMail()
|
||||
{
|
||||
@@ -624,7 +626,7 @@ class adminProxy extends HttpProxyController
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'TEST',
|
||||
WsBase::MESSAGE_TYPE_TEST_EMAIL,
|
||||
$subject,
|
||||
$from,
|
||||
$_POST['TO'],
|
||||
@@ -1026,7 +1028,7 @@ class adminProxy extends HttpProxyController
|
||||
*/
|
||||
public function uploadImage()
|
||||
{
|
||||
ValidationUploadedFiles::getValidationUploadedFiles()->dispach(function($validator) {
|
||||
ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
|
||||
echo G::json_encode([
|
||||
'success' => true,
|
||||
'failed' => true,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
use ProcessMaker\Util\DateTime;
|
||||
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
$response = new stdclass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
@@ -23,15 +25,22 @@ class AppProxy extends HttpProxyController
|
||||
* @param int $httpData->start
|
||||
* @param int $httpData->limit
|
||||
* @param string $httpData->appUid (optionalif it is not passed try use $_SESSION['APPLICATION'])
|
||||
* @return array containg the case notes
|
||||
* @return array containing the case notes
|
||||
*
|
||||
* @see workflow/engine/methods/cases/open.php
|
||||
* @see workflow/engine/methods/cases/casesListExtJs.php
|
||||
* @see workflow/engine/methods/cases/casesConsolidatedListExtJs.php
|
||||
*
|
||||
* @link https://wiki.processmaker.com/3.2/Case_Notes
|
||||
* @link https://wiki.processmaker.com/3.2/Cases/Case_Notes
|
||||
*/
|
||||
function getNotesList ($httpData)
|
||||
function getNotesList($httpData)
|
||||
{
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
$response = new stdclass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
$response->lostSession = true;
|
||||
print G::json_encode( $response );
|
||||
print G::json_encode($response);
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -66,8 +75,7 @@ class AppProxy extends HttpProxyController
|
||||
$httpData->pro = $caseLoad['PRO_UID'];
|
||||
}
|
||||
|
||||
if(!isset($httpData->pro) || empty($httpData->pro) )
|
||||
{
|
||||
if (!isset($httpData->pro) || empty($httpData->pro)) {
|
||||
$proUid = $_SESSION['PROCESS'];
|
||||
} else {
|
||||
$proUid = $httpData->pro;
|
||||
@@ -80,12 +88,15 @@ class AppProxy extends HttpProxyController
|
||||
}
|
||||
$usrUid = $_SESSION['USER_LOGGED'];
|
||||
|
||||
$respView = $case->getAllObjectsFrom($proUid, $appUid, $tasUid, $usrUid, "VIEW", $delIndex);
|
||||
$respView = $case->getAllObjectsFrom($proUid, $appUid, $tasUid, $usrUid, "VIEW", $delIndex);
|
||||
$respBlock = $case->getAllObjectsFrom($proUid, $appUid, $tasUid, $usrUid, "BLOCK", $delIndex);
|
||||
|
||||
if ($respView['CASES_NOTES'] == 0 && $respBlock['CASES_NOTES'] == 0) {
|
||||
return array ('totalCount' => 0,'notes' => array (),'noPerms' => 1
|
||||
);
|
||||
return [
|
||||
'totalCount' => 0,
|
||||
'notes' => [],
|
||||
'noPerms' => 1
|
||||
];
|
||||
}
|
||||
|
||||
$usrUid = isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : "";
|
||||
@@ -93,6 +104,12 @@ class AppProxy extends HttpProxyController
|
||||
$response = $appNotes->getNotesList($appUid, '', $httpData->start, $httpData->limit);
|
||||
$response = AppNotes::applyHtmlentitiesInNotes($response);
|
||||
|
||||
$iterator = 0;
|
||||
foreach ($response['array']['notes'] as $value) {
|
||||
$response ['array']['notes'][$iterator]['NOTE_DATE'] = DateTime::convertUtcToTimeZone($value['NOTE_DATE']);
|
||||
$iterator++;
|
||||
}
|
||||
|
||||
require_once("classes/model/Application.php");
|
||||
$oApplication = new Application();
|
||||
$aApplication = $oApplication->Load($appUid);
|
||||
|
||||
@@ -11,9 +11,10 @@ use ProcessMaker\Plugins\PluginRegistry;
|
||||
*/
|
||||
|
||||
use Maveriks\Util\ClassLoader;
|
||||
use \OAuth2\Request;
|
||||
use \ProcessMaker\BusinessModel\Light\Tracker;
|
||||
use \ProcessMaker\Services\OAuth2\Server;
|
||||
use OAuth2\Request;
|
||||
use ProcessMaker\BusinessModel\InputDocument;
|
||||
use ProcessMaker\BusinessModel\Light\Tracker;
|
||||
use ProcessMaker\Services\OAuth2\Server;
|
||||
|
||||
class Designer extends Controller
|
||||
{
|
||||
@@ -27,6 +28,8 @@ class Designer extends Controller
|
||||
* Index Action
|
||||
*
|
||||
* @param string $httpData (opional)
|
||||
*
|
||||
* @see Controller->call()
|
||||
*/
|
||||
public function index($httpData)
|
||||
{
|
||||
@@ -70,6 +73,8 @@ class Designer extends Controller
|
||||
$this->setVar("SYS_SKIN", SYS_SKIN);
|
||||
$this->setVar('HTTP_SERVER_HOSTNAME', System::getHttpServerHostnameRequestsFrontEnd());
|
||||
$this->setVar('PMDYNAFORM_FIRST_TIME', $userProperties->getPmdynaformFirstTime());
|
||||
$inpuDocument = new InputDocument();
|
||||
$this->setVar('maxFileSizeInformation', G::json_encode($inpuDocument->getMaxFileSize()));
|
||||
|
||||
if ($debug) {
|
||||
if (!file_exists(PATH_HTML . "lib-dev/pmUI/build.cache")) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Util\DateTime;
|
||||
|
||||
/**
|
||||
* Home controller
|
||||
@@ -359,6 +360,29 @@ class Home extends Controller
|
||||
$this->render();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cases information
|
||||
*
|
||||
* @param string $type
|
||||
* @param integer $start
|
||||
* @param integer $limit
|
||||
* @param string $user
|
||||
* @param string $filter
|
||||
* @param string $search
|
||||
* @param string $process
|
||||
* @param string $status
|
||||
* @param string $dateFrom
|
||||
* @param string $dateTo
|
||||
* @param string $callback
|
||||
* @param string $dir
|
||||
* @param string $sort
|
||||
* @param string $category
|
||||
* @return array
|
||||
*
|
||||
* @see \Home->appAdvancedSearch()
|
||||
* @see \Home->appList()
|
||||
* @see \Home->getApps()
|
||||
*/
|
||||
public function getAppsData(
|
||||
$type,
|
||||
$start = null,
|
||||
@@ -404,10 +428,10 @@ class Home extends Controller
|
||||
$solrEnabled = false;
|
||||
|
||||
if ((
|
||||
$type == "todo" || $type == "draft" || $type == "paused" || $type == "sent" ||
|
||||
$type == "selfservice" || $type == "unassigned" || $type == "search"
|
||||
) &&
|
||||
(($solrConf = System::solrEnv()) !== false)
|
||||
$type == "todo" || $type == "draft" || $type == "paused" || $type == "sent" ||
|
||||
$type == "selfservice" || $type == "unassigned" || $type == "search"
|
||||
) &&
|
||||
(($solrConf = System::solrEnv()) !== false)
|
||||
) {
|
||||
$ApplicationSolrIndex = new AppSolr(
|
||||
$solrConf["solr_enabled"],
|
||||
@@ -443,21 +467,21 @@ class Home extends Controller
|
||||
$category
|
||||
);
|
||||
} else {
|
||||
$dataList['userId'] = $user;
|
||||
$dataList['userUid'] = $this->userUid;
|
||||
$dataList['start'] = $start;
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['process'] = $process;
|
||||
$dataList['status'] = $status;
|
||||
$dataList['userId'] = $user;
|
||||
$dataList['userUid'] = $this->userUid;
|
||||
$dataList['start'] = $start;
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['process'] = $process;
|
||||
$dataList['status'] = $status;
|
||||
$dataList['dateFrom'] = $dateFrom;
|
||||
$dataList['dateTo'] = $dateTo;
|
||||
$dataList['dateTo'] = $dateTo;
|
||||
$dataList['callback'] = $callback;
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['category'] = $category;
|
||||
$dataList['action'] = $type;
|
||||
$dataList['action'] = $type;
|
||||
$dataList['dir'] = 'DESC';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
@@ -527,8 +551,9 @@ class Home extends Controller
|
||||
$generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
||||
$cases['data'][$i]['DEL_DELEGATE_DATE'] = '';
|
||||
if (!empty(config("system.workspace"))) {
|
||||
if (isset( $generalConfCasesList['casesListDateFormat'] ) && ! empty( $generalConfCasesList['casesListDateFormat'] )) {
|
||||
$cases['data'][$i]['DEL_DELEGATE_DATE'] = $conf->getSystemDate($row['DEL_DELEGATE_DATE'], 'casesListDateFormat');
|
||||
if (isset($generalConfCasesList['casesListDateFormat']) && !empty($generalConfCasesList['casesListDateFormat'])) {
|
||||
$cases['data'][$i]['DEL_DELEGATE_DATE'] = $conf->getSystemDate($row['DEL_DELEGATE_DATE'],
|
||||
'casesListDateFormat');
|
||||
}
|
||||
}
|
||||
if ($cases['data'][$i]['DEL_DELEGATE_DATE'] == '') {
|
||||
@@ -542,6 +567,12 @@ class Home extends Controller
|
||||
$notes = $appNotes->getNotesList($row['APP_UID'], '', $notesStart, $notesLimit);
|
||||
$notes = AppNotes::applyHtmlentitiesInNotes($notes);
|
||||
|
||||
$iterator = 0;
|
||||
foreach ($notes['array']['notes'] as $val) {
|
||||
$notes ['array']['notes'][$iterator]['NOTE_DATE'] = DateTime::convertUtcToTimeZone($val['NOTE_DATE']);
|
||||
$iterator++;
|
||||
}
|
||||
|
||||
$notes = $notes['array'];
|
||||
|
||||
$cases['data'][$i]['NOTES_COUNT'] = $notes['totalCount'];
|
||||
|
||||
@@ -11,8 +11,9 @@ use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Validation\ExceptionRestApi;
|
||||
use ProcessMaker\Validation\ValidationUploadedFiles;
|
||||
|
||||
header("Content-type: text/html;charset=utf-8");
|
||||
require_once 'classes/model/AdditionalTables.php';
|
||||
//We need to suppress the error for the unittest that use this function
|
||||
@header("Content-type: text/html;charset=utf-8");
|
||||
|
||||
|
||||
class pmTablesProxy extends HttpProxyController
|
||||
{
|
||||
@@ -404,7 +405,6 @@ class pmTablesProxy extends HttpProxyController
|
||||
$this->className = $table['ADD_TAB_CLASS_NAME'];
|
||||
$this->classPeerName = $this->className . 'Peer';
|
||||
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
|
||||
|
||||
if (! file_exists( $sPath . $this->className . '.php' )) {
|
||||
throw new Exception( 'Update:: ' . G::loadTranslation( 'ID_PMTABLE_CLASS_DOESNT_EXIST', $this->className ) );
|
||||
}
|
||||
@@ -427,7 +427,6 @@ class pmTablesProxy extends HttpProxyController
|
||||
if ($result) {
|
||||
G::auditLog("UpdateDataPmtable", "Table Name: ".$table['ADD_TAB_NAME']." Table ID: (".$table['ADD_TAB_UID'].") ");
|
||||
}
|
||||
|
||||
$this->success = $result;
|
||||
$this->message = $result ? G::loadTranslation( 'ID_UPDATED_SUCCESSFULLY' ) : G::loadTranslation( 'ID_UPDATE_FAILED' );
|
||||
}
|
||||
@@ -725,7 +724,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
}
|
||||
|
||||
try {
|
||||
ValidationUploadedFiles::getValidationUploadedFiles()->dispach(function($validator) {
|
||||
ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
|
||||
throw new ExceptionRestApi($validator->getMessage());
|
||||
});
|
||||
$result = new stdClass();
|
||||
@@ -1094,32 +1093,38 @@ class pmTablesProxy extends HttpProxyController
|
||||
/**
|
||||
* Update data from a addTable record
|
||||
*
|
||||
* @param $row
|
||||
* @param array $row
|
||||
* @param array $primaryKeys
|
||||
* @return boolean
|
||||
* @throws Exception
|
||||
*
|
||||
* @see workflow/engine/controllers/pmTablesProxy::dataUpdate()
|
||||
* @link https://wiki.processmaker.com/3.2/PM_Tables
|
||||
*/
|
||||
public function _dataUpdate ($row, $primaryKeys)
|
||||
public function _dataUpdate($row, $primaryKeys)
|
||||
{
|
||||
$keys = G::decrypt( $row['__index__'], 'pmtable' );
|
||||
$keys = explode( ',', $keys );
|
||||
unset( $row['__index__'] );
|
||||
$keys = G::decrypt($row['__index__'], 'pmtable');
|
||||
$keys = explode(',', $keys);
|
||||
unset($row['__index__']);
|
||||
|
||||
$params = array ();
|
||||
$params = [];
|
||||
|
||||
foreach ($keys as $key) {
|
||||
$params[] = is_numeric( $key ) ? $key : "'$key'";
|
||||
$params[] = is_int($key) ? (int)$key : (string)$key;
|
||||
}
|
||||
|
||||
$obj = null;
|
||||
eval( '$obj = ' . $this->classPeerName . '::retrieveByPk(' . implode( ',', $params ) . ');' );
|
||||
|
||||
if (is_object( $obj )) {
|
||||
$className = $this->classPeerName;
|
||||
$obj = call_user_func_array($className . "::retrieveByPk", $params);
|
||||
if (is_object($obj)) {
|
||||
foreach ($row as $key => $value) {
|
||||
// validation, don't modify primary keys
|
||||
if (in_array( $key, $primaryKeys )) {
|
||||
throw new Exception( G::loadTranslation( 'ID_DONT_MODIFY_PK_VALUE', array ($key
|
||||
) ) );
|
||||
if (in_array($key, $primaryKeys)) {
|
||||
throw new Exception(G::loadTranslation('ID_DONT_MODIFY_PK_VALUE', [
|
||||
$key
|
||||
]));
|
||||
}
|
||||
$action = 'set' . AdditionalTables::getPHPName( $key );
|
||||
$obj->$action( $value );
|
||||
$action = 'set' . AdditionalTables::getPHPName($key);
|
||||
$obj->$action($value);
|
||||
}
|
||||
if ($r = $obj->validate()) {
|
||||
$obj->save();
|
||||
@@ -1129,7 +1134,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
foreach ($obj->getValidationFailures() as $objValidationFailure) {
|
||||
$msg .= $objValidationFailure->getMessage() . "\n";
|
||||
}
|
||||
throw new Exception( $msg );
|
||||
throw new Exception($msg);
|
||||
}
|
||||
} else {
|
||||
$result = false;
|
||||
@@ -1141,22 +1146,25 @@ class pmTablesProxy extends HttpProxyController
|
||||
/**
|
||||
* Update data from a addTable record
|
||||
*
|
||||
* @param $row
|
||||
* @param array $row
|
||||
* @return boolean
|
||||
* @see workflow/engine/controllers/pmTablesProxy::dataDestroy()
|
||||
* @link https://wiki.processmaker.com/3.2/PM_Tables
|
||||
*/
|
||||
public function _dataDestroy ($row)
|
||||
public function _dataDestroy($row)
|
||||
{
|
||||
$row = G::decrypt( $row, 'pmtable' );
|
||||
$row = str_replace( '"', '', $row );
|
||||
$keys = explode( ',', $row );
|
||||
$params = array ();
|
||||
$row = G::decrypt($row, 'pmtable');
|
||||
$row = str_replace('"', '', $row);
|
||||
$keys = explode(',', $row);
|
||||
$params = [];
|
||||
foreach ($keys as $key) {
|
||||
$params[] = is_numeric( $key ) ? $key : "'$key'";
|
||||
$params[] = is_int($key) ? (int)$key : (string)$key;
|
||||
}
|
||||
|
||||
$obj = null;
|
||||
eval( '$obj = ' . $this->classPeerName . '::retrieveByPk(' . implode( ',', $params ) . ');' );
|
||||
$className = $this->classPeerName;
|
||||
$obj = call_user_func_array($className . "::retrieveByPk", $params);
|
||||
|
||||
if (is_object( $obj )) {
|
||||
if (is_object($obj)) {
|
||||
$obj->delete();
|
||||
return true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user