This commit is contained in:
dheeyi
2016-03-21 18:05:02 -04:00
parent 3f26b11f9a
commit b735ee25ad
3 changed files with 17 additions and 33 deletions

View File

@@ -52,31 +52,8 @@ class DynaformsMigrator implements Importable, Exportable
try {
$oData = new \StdClass();
$oData->dynaforms = $this->processes->getDynaformRows($prj_uid);
$workflowFile = array();
foreach ($oData->dynaforms as $dynaform) {
$dynFile = PATH_DYNAFORM . $dynaform['DYN_FILENAME'] . '.xml';
$workflowFile['DYNAFORMS'][] = array(
"filename" => $dynaform['DYN_TITLE'],
"filepath" => $dynaform['DYN_FILENAME'] . '.xml',
"file_content" => file_get_contents($dynFile)
);
$htmlFile = PATH_DYNAFORM . $dynaform['DYN_FILENAME'] . '.html';
if (file_exists($htmlFile)) {
$workflowFile['DYNAFORMS'][] = array(
"filename" => $dynaform['DYN_FILENAME'] . '.html',
"filepath" => $dynaform['DYN_FILENAME'] . '.html',
"file_content" => file_get_contents($htmlFile)
);
}
}
$result = array(
'workflow-definition' => (array)$oData,
'workflow-files' => $workflowFile
'workflow-definition' => (array)$oData
);
return $result;