PM-1635 "PM-1635 y PM-1154" SOLVED
Issue:
- PM-1635: No debe estar disponible la importacion de diagramas con extension .bpmn en ProcessMaker 2.9
- PM-1154: When importing a .pmx (PM 3) process into PM 2.8 Community, it opens the new BPMN designer
Cause:
Ninguna
Solution:
Se a agregado validacion de la siguiente manera:
- Si la version es >= 3 entonces se aceptan archivos con la extension ----> .pm, .pmx, .bpmn
- Si la version es < 3 entonces se aceptan archivos con la extension ----> .pm
This commit is contained in:
@@ -29,11 +29,24 @@ $RBAC->requirePermissions( 'PM_FACTORY' );
|
||||
G::loadClass( 'configuration' );
|
||||
$conf = new Configurations();
|
||||
|
||||
if (preg_match("/^([\d\.]+).*$/", System::getVersion(), $arrayMatch)) {
|
||||
$pmVersion = $arrayMatch[1];
|
||||
} else {
|
||||
$pmVersion = ""; //Branch master
|
||||
}
|
||||
|
||||
$arrayPmFileExtension = array("pm", "pmx", "bpmn");
|
||||
|
||||
if ($pmVersion != "") {
|
||||
$arrayPmFileExtension = (version_compare($pmVersion . "", "3", ">="))? $arrayPmFileExtension : array("pm");
|
||||
}
|
||||
|
||||
$oHeadPublisher->addExtJsScript( 'processes/main', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'processes/main' ); //adding a html file .html.
|
||||
|
||||
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
||||
$oHeadPublisher->assign( 'PARTNER_FLAG', $partnerFlag );
|
||||
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
||||
$oHeadPublisher->assign("arrayPmFileExtension", $arrayPmFileExtension);
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
@@ -1213,7 +1213,7 @@ importProcess = function()
|
||||
handler : function(){
|
||||
var arrayMatch = [];
|
||||
|
||||
if ((arrayMatch = eval("/^.+\.(pm|pmx|bpmn)$/i").exec(Ext.getCmp("form-file").getValue()))) {
|
||||
if ((arrayMatch = eval("/^.+\.(" + arrayPmFileExtension.join("|") + ")$/i").exec(Ext.getCmp("form-file").getValue()))) {
|
||||
var fileExtension = arrayMatch[1];
|
||||
|
||||
switch (fileExtension) {
|
||||
|
||||
Reference in New Issue
Block a user