Merged in victorsl/processmaker/PM-1635 (pull request #1752)
PM-1635 "PM-1635 y PM-1154" SOLVED
This commit is contained in:
@@ -29,11 +29,24 @@ $RBAC->requirePermissions( 'PM_FACTORY' );
|
|||||||
G::loadClass( 'configuration' );
|
G::loadClass( 'configuration' );
|
||||||
$conf = new Configurations();
|
$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->addExtJsScript( 'processes/main', true ); //adding a javascript file .js
|
||||||
$oHeadPublisher->addContent( 'processes/main' ); //adding a html file .html.
|
$oHeadPublisher->addContent( 'processes/main' ); //adding a html file .html.
|
||||||
|
|
||||||
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
||||||
$oHeadPublisher->assign( 'PARTNER_FLAG', $partnerFlag );
|
$oHeadPublisher->assign( 'PARTNER_FLAG', $partnerFlag );
|
||||||
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
||||||
|
$oHeadPublisher->assign("arrayPmFileExtension", $arrayPmFileExtension);
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|||||||
@@ -1213,7 +1213,7 @@ importProcess = function()
|
|||||||
handler : function(){
|
handler : function(){
|
||||||
var arrayMatch = [];
|
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];
|
var fileExtension = arrayMatch[1];
|
||||||
|
|
||||||
switch (fileExtension) {
|
switch (fileExtension) {
|
||||||
|
|||||||
Reference in New Issue
Block a user