fix error in New Process button when version is not greater or equal to 3
This commit is contained in:
@@ -32,14 +32,9 @@ $conf = new Configurations();
|
||||
|
||||
$pmVersion = (preg_match("/^([\d\.]+).*$/", System::getVersion(), $arrayMatch)) ? $arrayMatch[1] : ""; //Otherwise: Branch master
|
||||
|
||||
$arrayFlagImportFileExtension = array("pm", "pmx", "pmx2", "bpmn");
|
||||
$arrayFlagImportFileExtension = array("pmx", "pmx2", "bpmn");
|
||||
|
||||
$arrayFlagMenuNewOption = array("pm" => true, "bpmn" => true);
|
||||
|
||||
if ($pmVersion != "") {
|
||||
$arrayFlagImportFileExtension = (version_compare($pmVersion . "", "3", ">=")) ? $arrayFlagImportFileExtension : array("pm");
|
||||
$arrayFlagMenuNewOption = (version_compare($pmVersion . "", "3", ">=")) ? array("bpmn" => true) : array("pm" => true);
|
||||
}
|
||||
$arrayFlagMenuNewOption = array("bpmn" => true);
|
||||
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
|
||||
@@ -231,27 +231,12 @@ Ext.onReady(function(){
|
||||
}
|
||||
};
|
||||
|
||||
var mnuNewProject = {
|
||||
text: _("ID_NEW_PROJECT"),
|
||||
iconCls: "silk-add",
|
||||
icon: "",
|
||||
pmTypeProject: "classicProject",
|
||||
handler: function ()
|
||||
{
|
||||
newProcess({type: "classicProject"});
|
||||
}
|
||||
};
|
||||
|
||||
var arrayMenuNewOption = [];
|
||||
|
||||
if (typeof(arrayFlagMenuNewOption["bpmn"]) != "undefined") {
|
||||
arrayMenuNewOption.push(mnuNewBpmnProject);
|
||||
}
|
||||
|
||||
//if (typeof(arrayFlagMenuNewOption["pm"]) != "undefined") {
|
||||
// arrayMenuNewOption.push(mnuNewProject);
|
||||
//}
|
||||
|
||||
for (i = 0; i <= arrayMenuNewOptionPlugin.length - 1; i++) {
|
||||
try {
|
||||
if (typeof(arrayMenuNewOptionPlugin[i].handler) != "undefined") {
|
||||
|
||||
Reference in New Issue
Block a user