Merged 3.0.1.8 into MT-10
This commit is contained in:
784
composer.lock
generated
784
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@
|
||||
define("PROCESSMAKER_PATH", $scriptDir);
|
||||
define("WORKFLOW_PATH", $scriptDir . 'workflow/');
|
||||
define("WORKFLOW_BIN_PATH", $scriptDir . 'workflow/engine/bin/');
|
||||
|
||||
error_reporting(error_reporting() & ~E_DEPRECATED & ~E_STRICT);
|
||||
|
||||
include WORKFLOW_BIN_PATH . '/cli.php';
|
||||
|
||||
|
||||
@@ -653,7 +653,7 @@ class indicatorsCalculator
|
||||
G::loadClass('wsTools');
|
||||
$currentWS = defined('SYS_SYS') ? SYS_SYS : 'Wokspace Undefined';
|
||||
$workSpace = new workspaceTools($currentWS);
|
||||
$arrayHost = split(":", $workSpace->dbHost);
|
||||
$arrayHost = explode(':', $workSpace->dbHost);
|
||||
$host = "host=".$arrayHost[0];
|
||||
$port = count($arrayHost) > 1 ? ";port=".$arrayHost[1] : "";
|
||||
$db = ";dbname=".$workSpace->dbName;
|
||||
|
||||
@@ -245,7 +245,11 @@ function executeQuery ($SqlStatement, $DBConnectionUID = 'workflow', $aParameter
|
||||
G::loadClass('system');
|
||||
$blackList = System::getQueryBlackList();
|
||||
$aListQueries = explode('|', $blackList['queries']);
|
||||
$aListAllTables = explode('|', $blackList['tables'].$blackList['pmtables']);
|
||||
$aListAllTables = explode(
|
||||
'|',
|
||||
((isset($blackList['tables']))? $blackList['tables'] : '') .
|
||||
((isset($blackList['pmtables']))? $blackList['pmtables'] : '')
|
||||
);
|
||||
$parseSqlStm = new PHPSQLParser($SqlStatement);
|
||||
try {
|
||||
//Parsing queries and check the blacklist
|
||||
|
||||
@@ -1139,11 +1139,13 @@ class pmTablesProxy extends HttpProxyController
|
||||
$aErrors[$count]['IS_PMTABLE'] = $isPmTable;
|
||||
$aErrors[$count]['PRO_UID'] = $tableProUid;
|
||||
} else {
|
||||
$aErrors[$count]['NAME_TABLE'] = $contentSchema['ADD_TAB_NAME'];
|
||||
$aErrors[$count]['ERROR_TYPE'] = ERROR_RP_TABLES_OVERWRITE;
|
||||
$aErrors[$count]['ERROR_MESS'] = G::loadTranslation('ID_OVERWRITE_RPTABLE', array($contentSchema['ADD_TAB_NAME']));
|
||||
$aErrors[$count]['IS_PMTABLE'] = $isPmTable;
|
||||
$aErrors[$count]['PRO_UID'] = $tableProUid;
|
||||
if ($tableExists !== false && !$overWrite) {
|
||||
$aErrors[$count]['NAME_TABLE'] = $contentSchema['ADD_TAB_NAME'];
|
||||
$aErrors[$count]['ERROR_TYPE'] = ERROR_RP_TABLES_OVERWRITE;
|
||||
$aErrors[$count]['ERROR_MESS'] = G::loadTranslation('ID_OVERWRITE_RPTABLE', array($contentSchema['ADD_TAB_NAME']));
|
||||
$aErrors[$count]['IS_PMTABLE'] = $isPmTable;
|
||||
$aErrors[$count]['PRO_UID'] = $tableProUid;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -3093,7 +3093,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
( 'LABEL','ID_CREATED_BY','en','Created By','2014-01-15') ,
|
||||
( 'LABEL','ID_REPORT_TABLE_TITLE','en','Title','2014-01-15') ,
|
||||
( 'LABEL','ID_REPORT_TABLE','en','Report Table','2014-01-15') ,
|
||||
( 'LABEL','ID_ASSIGNED_FIEDS','en','ASSIGNED FIELDS','2014-01-15') ,
|
||||
( 'LABEL','ID_ASSIGNED_FIELDS','en','ASSIGNED FIELDS','2014-01-15') ,
|
||||
( 'LABEL','ID_SAVE_AND_CONTINUE','en','Save and Continue','2014-01-15') ,
|
||||
( 'LABEL','ID_NO_SELECTED_FIELDS','en','No selected fields','2014-01-15') ,
|
||||
( 'LABEL','ID_DYNAFORM_FIELD','en','Dynaform Field','2014-01-15') ,
|
||||
@@ -61374,4 +61374,4 @@ INSERT INTO ADDONS_MANAGER (ADDON_DESCRIPTION,ADDON_ID,ADDON_NAME,ADDON_NICK,ADD
|
||||
('SSO with an LDAP provider.','windowsSSO','windowsSSO','windowsSSO','Colosa','localRegistry','ready','00000000000000000000000000010011','features','','','0'),
|
||||
('Integration with Gmail','pmGmail','pmGmail','pmGmail','Colosa','localRegistry','ready','00000000000000000000000000010012','features','','','0'),
|
||||
('User-based Language Management.','userBasedLanguage','userBasedLanguage','userBasedLanguage','Colosa','localRegistry','ready','00000000000000000000000000010013','features','','','0'),
|
||||
('User-based Time Zone Management.','userBasedTimeZone','userBasedTimeZone','userBasedTimeZone','Colosa','localRegistry','ready','00000000000000000000000000010014','features','','','0');
|
||||
('User-based Time Zone Management.','userBasedTimeZone','userBasedTimeZone','userBasedTimeZone','Colosa','localRegistry','ready','00000000000000000000000000010014','features','','','0');
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user