PM-2835 "Adicionar los siguientes features..." SOLVED
Issue:
Adicionar los siguientes features la posibilidad de seleccionarse en la licencia (features):
- Code Scanner
- Multiple Email Servers
- Mobile Fields
Cause:
Nueva validacion de licencia para features
Solution:
- Se agrego validacion de licencia para los features especificados
- Se completo el "Code Scanner" para procesos BPMN (import and triggers)
Note:
QA debera hacer pruebas en procesos pm y pmx
This commit is contained in:
@@ -29,19 +29,41 @@ ini_set("max_execution_time", 0);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=") &&
|
||||
isset($_FILES["PROCESS_FILENAME"]) &&
|
||||
pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION) == "pm" &&
|
||||
$_FILES["PROCESS_FILENAME"]["error"] == 0
|
||||
$_FILES["PROCESS_FILENAME"]["error"] == 0 &&
|
||||
preg_match("/^(?:pm|pmx)$/", pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION))
|
||||
) {
|
||||
//Check disabled code
|
||||
$response = array();
|
||||
|
||||
try {
|
||||
$fh = fopen($_FILES["PROCESS_FILENAME"]["tmp_name"], "rb");
|
||||
$content = fread($fh, (int)(fread($fh, 9)));
|
||||
$data = unserialize($content);
|
||||
fclose($fh);
|
||||
$arrayTrigger = array();
|
||||
$projectTitle = "";
|
||||
|
||||
if (is_object($data) && isset($data->triggers) && is_array($data->triggers) && !empty($data->triggers)) {
|
||||
switch (pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION)) {
|
||||
case "pm":
|
||||
$fh = fopen($_FILES["PROCESS_FILENAME"]["tmp_name"], "rb");
|
||||
$content = fread($fh, (int)(fread($fh, 9)));
|
||||
$data = unserialize($content);
|
||||
fclose($fh);
|
||||
|
||||
if (is_object($data) && isset($data->triggers) && is_array($data->triggers) && !empty($data->triggers)) {
|
||||
$arrayTrigger = $data->triggers;
|
||||
$projectTitle = $data->process["PRO_TITLE"];
|
||||
}
|
||||
break;
|
||||
case "pmx":
|
||||
$importer = new XmlImporter();
|
||||
|
||||
$data = $importer->load($_FILES["PROCESS_FILENAME"]["tmp_name"]);
|
||||
|
||||
if (isset($data["tables"]["workflow"]["triggers"]) && is_array($data["tables"]["workflow"]["triggers"]) && !empty($data["tables"]["workflow"]["triggers"])) {
|
||||
$arrayTrigger = $data["tables"]["workflow"]["triggers"];
|
||||
$projectTitle = $data["tables"]["bpmn"]["project"][0]["prj_name"];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!empty($arrayTrigger)) {
|
||||
G::LoadClass("codeScanner");
|
||||
|
||||
$arraySystemConfiguration = System::getSystemConfiguration(PATH_CONFIG . "env.ini");
|
||||
@@ -50,7 +72,7 @@ if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm
|
||||
|
||||
$strFoundDisabledCode = "";
|
||||
|
||||
foreach ($data->triggers as $value) {
|
||||
foreach ($arrayTrigger as $value) {
|
||||
$arrayTriggerData = $value;
|
||||
|
||||
$arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $arrayTriggerData["TRI_WEBBOT"]);
|
||||
@@ -69,7 +91,7 @@ if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm
|
||||
if ($strFoundDisabledCode != "") {
|
||||
$response["status"] = "DISABLED-CODE";
|
||||
$response["success"] = true;
|
||||
$response["message"] = G::LoadTranslation("ID_DISABLED_CODE_PROCESS", array($data->process["PRO_TITLE"], "\n" . $strFoundDisabledCode));
|
||||
$response["message"] = G::LoadTranslation("ID_DISABLED_CODE_PROCESS", array($projectTitle, "\n" . $strFoundDisabledCode));
|
||||
|
||||
echo G::json_encode($response);
|
||||
exit(0);
|
||||
@@ -444,5 +466,5 @@ if ($action == "uploadFileNewProcessExist") {
|
||||
}
|
||||
|
||||
echo G::json_encode( $result );
|
||||
exit();
|
||||
exit(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user