Merge remote-tracking branch 'upstream/MT-10' into MT-10
This commit is contained in:
@@ -250,13 +250,13 @@ class FilesManager
|
||||
$aData = array_change_key_case($aData, CASE_UPPER);
|
||||
$oProcessFiles->fromArray($aData, \BasePeer::TYPE_FIELDNAME);
|
||||
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $aData['PRO_UID'] . PATH_SEP . basename($aData['PRF_PATH']);
|
||||
$oProcessFiles->setPrfPath($sDirectory);
|
||||
|
||||
if($this->existsProcessFile($aData['PRF_UID'])) {
|
||||
$sPkProcessFiles = \G::generateUniqueID();
|
||||
$oProcessFiles->setPrfUid($sPkProcessFiles);
|
||||
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $aData['PRO_UID'] . PATH_SEP . basename($aData['PRF_PATH']);
|
||||
$oProcessFiles->setPrfPath($sDirectory);
|
||||
|
||||
$emailEvent = new \ProcessMaker\BusinessModel\EmailEvent();
|
||||
$emailEvent->updatePrfUid($aData['PRF_UID'], $sPkProcessFiles, $aData['PRO_UID']);
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ class AssignmentRulesMigrator implements Importable, Exportable
|
||||
{
|
||||
try {
|
||||
$oAssignRules = new \StdClass();
|
||||
$oAssignRules->tasks = $this->processes->getTaskRows($prj_uid);
|
||||
$oAssignRules->taskusers = $this->processes->getTaskUserRows($oAssignRules->tasks);
|
||||
$oAssignRulesTasks = $this->processes->getTaskRows($prj_uid);
|
||||
$oAssignRules->taskusers = $this->processes->getTaskUserRows($oAssignRulesTasks);
|
||||
|
||||
$result = array(
|
||||
'workflow-definition' => (array)$oAssignRules
|
||||
|
||||
@@ -32,7 +32,7 @@ class FilesMigrator implements Importable, Exportable
|
||||
try {
|
||||
$aTable = $data['TABLE'];
|
||||
foreach ($aTable as $value) {
|
||||
if ($value['PRF_EDITABLE'] !== 1) {
|
||||
if ($value['PRF_EDITABLE'] === '0') {
|
||||
if ($replace) {
|
||||
$this->processes->createFilesManager($value['PRO_UID'], array($value));
|
||||
} else {
|
||||
@@ -92,7 +92,7 @@ class FilesMigrator implements Importable, Exportable
|
||||
|
||||
$fileHandler = new FileHandler();
|
||||
$arrayPublicFileToExclude = $fileHandler->getFilesToExclude($prj_uid);
|
||||
$workflowFile = $fileHandler->getTemplatesOrPublicFiles($prj_uid, $arrayPublicFileToExclude, 'public');
|
||||
$workflowFile = $fileHandler->getTemplatesOrPublicFiles($prj_uid, $arrayPublicFileToExclude, 'PUBLIC');
|
||||
|
||||
$result = array(
|
||||
'workflow-definition' => (array)$oData,
|
||||
|
||||
@@ -148,7 +148,7 @@ class GranularImporter
|
||||
$objClass = $this->factory->create($data['name']);
|
||||
if (is_object($objClass)) {
|
||||
$dataImport = $data['data'][$data['name']];
|
||||
$replace = ($data['value'] == 'merge') ? true : false;
|
||||
$replace = ($data['value'] == 'replace') ? true : false;
|
||||
$migratorData = $objClass->import($dataImport, $replace);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,10 +68,8 @@ class ProcessDefinitionMigrator implements Importable, Exportable
|
||||
$bpmnStruct["LANESET"] = \BpmnLaneset::getAll($prj_uid);
|
||||
$bpmnStruct["PARTICIPANT"] = \BpmnParticipant::getAll($prj_uid);
|
||||
$bpmnStruct["PROCESS"] = \BpmnProcess::getAll($prj_uid);
|
||||
$bpmnStruct["PROJECT"] = array(\BpmnProjectPeer::retrieveByPK($prj_uid)->toArray());
|
||||
|
||||
$oData = new \StdClass();
|
||||
$oData->process = $this->processes->getProcessRow($prj_uid, false);
|
||||
$oData->tasks = $this->processes->getTaskRows($prj_uid);
|
||||
|
||||
$oDataTask = new \StdClass();
|
||||
@@ -83,7 +81,6 @@ class ProcessDefinitionMigrator implements Importable, Exportable
|
||||
$oData->steps = $this->processes->getStepRows($prj_uid);
|
||||
$oData->groupwfs = $this->processes->getGroupwfRows($oDataTask->taskusers);
|
||||
$oData->steptriggers = $this->processes->getStepTriggerRows($oData->tasks);
|
||||
$oData->reportTablesVars = $this->processes->getReportTablesVarsRows($prj_uid);
|
||||
$oData->subProcess = $this->processes->getSubProcessRow($prj_uid);
|
||||
$oData->caseTracker = $this->processes->getCaseTrackerRow($prj_uid);
|
||||
$oData->caseTrackerObject = $this->processes->getCaseTrackerObjectRow($prj_uid);
|
||||
|
||||
@@ -56,7 +56,8 @@ class ReportTablesMigrator implements Importable, Exportable
|
||||
{
|
||||
try {
|
||||
$oData = new \StdClass();
|
||||
$oData->reportTables = $this->processes->getReportTablesRows($prj_uid);
|
||||
$oData->reportTables = $this->processes->getReportTables($prj_uid);
|
||||
$oData->reportTablesVars = $this->processes->getReportTablesVar($prj_uid);
|
||||
|
||||
$result = array(
|
||||
'workflow-definition' => (array)$oData
|
||||
|
||||
@@ -32,7 +32,7 @@ class TemplatesMigrator implements Importable, Exportable
|
||||
try {
|
||||
$aTable = $data['TABLE'];
|
||||
foreach ($aTable as $value) {
|
||||
if ($value['PRF_EDITABLE'] === 1) {
|
||||
if ($value['PRF_EDITABLE'] === '1') {
|
||||
if ($replace) {
|
||||
$this->processes->createFilesManager($value['PRO_UID'], array($value));
|
||||
} else {
|
||||
@@ -43,7 +43,7 @@ class TemplatesMigrator implements Importable, Exportable
|
||||
$aPath = $data['PATH'];
|
||||
foreach ($aPath as $target => $files) {
|
||||
$basePath = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'mailTemplates' . PATH_SEP;
|
||||
if (strtoupper($target) === 'TEMPLATES') {
|
||||
if (strtoupper($target) === 'TEMPLATE') {
|
||||
foreach ($files as $file) {
|
||||
$filename = $basePath . ((isset($file["file_path"])) ? $file["file_path"] : $file["filepath"]);
|
||||
$path = dirname($filename);
|
||||
|
||||
@@ -58,9 +58,7 @@ class TriggersMigrator implements Importable, Exportable
|
||||
{
|
||||
try {
|
||||
$oData = new \StdClass();
|
||||
$oDataTasks = $this->processes->getTaskRows($prj_uid);
|
||||
$oData->triggers = $this->processes->getTriggerRows($prj_uid);
|
||||
$oData->steptriggers = $this->processes->getStepTriggerRows($oDataTasks);
|
||||
|
||||
$result = array(
|
||||
'workflow-definition' => (array)$oData
|
||||
|
||||
Reference in New Issue
Block a user