Merged in mcuiza/processmaker/PM-4170-A (pull request #3351)

PM-4170
This commit is contained in:
Julio Cesar Laura Avendaño
2015-12-10 12:40:56 -04:00
2 changed files with 23 additions and 5 deletions

View File

@@ -117,7 +117,12 @@ if (isset($_FILES["PROCESS_FILENAME"]) &&
$importer->setSourceFromGlobals("PROCESS_FILENAME");
try {
$prjUid = $importer->import();
$prjUid = $importer->import();
G::LoadClass( 'Process' );
$oProcess = new Process();
$processData = $oProcess->load( $prjUid );
$proType = $processData["PRO_TYPE"];
$result = array(
"success" => true,
@@ -125,7 +130,8 @@ if (isset($_FILES["PROCESS_FILENAME"]) &&
"ExistProcessInDatabase" => 0,
"ExistGroupsInDatabase" => 0,
"sNewProUid" => $prjUid,
"project_type" => "bpmn"
"project_type" => "bpmn",
"project_type_aux" => $proType
);
} catch (Exception $e) {
$result = array(
@@ -181,6 +187,11 @@ if (isset($_POST["PRO_FILENAME"]) &&
try {
$prjUid = $importer->import($option, $optionGroup);
G::LoadClass( 'Process' );
$oProcess = new Process();
$processData = $oProcess->load( $prjUid );
$proType = $processData["PRO_TYPE"];
$result = array(
"success" => true,
@@ -188,7 +199,8 @@ if (isset($_POST["PRO_FILENAME"]) &&
"ExistProcessInDatabase" => 0,
"ExistGroupsInDatabase" => 0,
"sNewProUid" => $prjUid,
"project_type" => "bpmn"
"project_type" => "bpmn",
"project_type_aux" => $proType
);
} catch (Exception $e) {
$result = array(

View File

@@ -1169,7 +1169,10 @@ importProcessExistProcess = function()
var sNewProUid = resp_.sNewProUid;
if (resp_.ExistGroupsInDatabase == 0) {
if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") {
if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") {
if (typeof(resp_.project_type_aux) != "undefined" && resp_.project_type_aux == "NORMAL") {
importProcessCallbackFile = false;
}
var goTo = importProcessCallbackFile ? importProcessCallbackFile : "../designer?prj_uid=";
openWindowIfIE(goTo + sNewProUid);
} else {
@@ -1313,7 +1316,10 @@ importProcess = function()
if (resp_.ExistGroupsInDatabase == "0") {
var sNewProUid = resp_.sNewProUid;
if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") {
if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") {
if (typeof(resp_.project_type_aux) != "undefined" && resp_.project_type_aux == "NORMAL") {
importProcessCallbackFile = false;
}
var goTo = importProcessCallbackFile ? importProcessCallbackFile : "../designer?prj_uid=";
openWindowIfIE(goTo + sNewProUid);
} else {