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:
    Nuevo validacion de licencia para features
Solution:
    Se agrego validacion de licencia para los features especificados
This commit is contained in:
Victor Saisa Lopez
2015-06-01 14:15:53 -04:00
parent 9e6237ca86
commit 42faa45f67
15 changed files with 178 additions and 123 deletions

View File

@@ -2736,7 +2736,7 @@ function run_check_plugin_disabled_code($task, $args)
$arrayFoundDisabledCode = array_merge($cs->checkDisabledCode("FILE", PATH_PLUGINS . $pluginName . ".php"), $cs->checkDisabledCode("PATH", PATH_PLUGINS . $pluginName)); $arrayFoundDisabledCode = array_merge($cs->checkDisabledCode("FILE", PATH_PLUGINS . $pluginName . ".php"), $cs->checkDisabledCode("PATH", PATH_PLUGINS . $pluginName));
if (count($arrayFoundDisabledCode) > 0) { if (!empty($arrayFoundDisabledCode)) {
$strFoundDisabledCode .= (($strFoundDisabledCode != "")? "\n\n" : "") . "> " . $pluginName; $strFoundDisabledCode .= (($strFoundDisabledCode != "")? "\n\n" : "") . "> " . $pluginName;
foreach ($arrayFoundDisabledCode as $key2 => $value2) { foreach ($arrayFoundDisabledCode as $key2 => $value2) {

View File

@@ -80,7 +80,7 @@ class CodeScanner
public function existsDisabledCode() public function existsDisabledCode()
{ {
try { try {
return count($this->arrayDisabledCode) > 0; return !empty($this->arrayDisabledCode);
} catch (Exception $e) { } catch (Exception $e) {
throw $e; throw $e;
} }
@@ -174,7 +174,7 @@ class CodeScanner
$arrayAux = $this->checkDisabledCodeInSource($source); $arrayAux = $this->checkDisabledCodeInSource($source);
if (count($arrayAux) > 0) { if (!empty($arrayAux)) {
$arrayFoundCode["source"] = $arrayAux; $arrayFoundCode["source"] = $arrayAux;
} }
break; break;
@@ -202,7 +202,7 @@ class CodeScanner
$arrayAux = $this->checkDisabledCodeInSource($source); $arrayAux = $this->checkDisabledCodeInSource($source);
if (count($arrayAux) > 0) { if (!empty($arrayAux)) {
$arrayFoundCode[$path] = $arrayAux; $arrayFoundCode[$path] = $arrayAux;
} }
} }

View File

@@ -595,12 +595,24 @@ function run_check_workspace_disabled_code($args, $opts)
foreach ($arrayWorkspace as $value) { foreach ($arrayWorkspace as $value) {
$workspace = $value; $workspace = $value;
if (!defined("SYS_SYS")) {
define("SYS_SYS", $workspace->name);
}
if (!defined("PATH_DATA_SITE")) {
define("PATH_DATA_SITE", PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP);
}
if (!$workspace->pmLicensedFeaturesVerifyFeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=")) {
throw new Exception("Error: This command cannot be used because your license does not include it.");
}
echo "> Workspace: " . $workspace->name . "\n"; echo "> Workspace: " . $workspace->name . "\n";
try { try {
$arrayFoundDisabledCode = $workspace->getDisabledCode(); $arrayFoundDisabledCode = $workspace->getDisabledCode();
if (count($arrayFoundDisabledCode) > 0) { if (!empty($arrayFoundDisabledCode)) {
$strFoundDisabledCode = ""; $strFoundDisabledCode = "";
foreach ($arrayFoundDisabledCode as $value2) { foreach ($arrayFoundDisabledCode as $value2) {
@@ -630,6 +642,8 @@ function run_check_workspace_disabled_code($args, $opts)
} catch (Exception $e) { } catch (Exception $e) {
echo "Errors to check disabled code: " . CLI::error($e->getMessage()) . "\n\n"; echo "Errors to check disabled code: " . CLI::error($e->getMessage()) . "\n\n";
} }
$workspace->close();
} }
echo "Done!\n"; echo "Done!\n";

View File

@@ -3373,15 +3373,17 @@ class Cases
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
$cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : ""); $cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : "");
$strFoundDisabledCode = ""; $strFoundDisabledCode = "";
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
foreach ($aTriggers as $aTrigger) { foreach ($aTriggers as $aTrigger) {
//Check disabled code
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=")) {
//Check disabled code
$arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $aTrigger["TRI_WEBBOT"]); $arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $aTrigger["TRI_WEBBOT"]);
if (count($arrayFoundDisabledCode) > 0) { if (!empty($arrayFoundDisabledCode)) {
$strCodeAndLine = ""; $strCodeAndLine = "";
foreach ($arrayFoundDisabledCode["source"] as $key => $value) { foreach ($arrayFoundDisabledCode["source"] as $key => $value) {
@@ -3391,7 +3393,9 @@ class Cases
$strFoundDisabledCode .= "<br />- " . $aTrigger["TRI_TITLE"] . ": " . $strCodeAndLine; $strFoundDisabledCode .= "<br />- " . $aTrigger["TRI_TITLE"] . ": " . $strCodeAndLine;
continue; continue;
} }
}
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
//Execute //Execute
$bExecute = true; $bExecute = true;

View File

@@ -5085,10 +5085,15 @@ class Processes
$arrayDisabledCode = array(); $arrayDisabledCode = array();
/*----------------------------------********---------------------------------*/
if (!PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=")) {
//Return
return $arrayDisabledCode;
}
//Set variables //Set variables
/*----------------------------------********---------------------------------*/
$cs = new CodeScanner("DISABLED_CODE"); $cs = new CodeScanner("DISABLED_CODE");
/*----------------------------------********---------------------------------*/
$delimiter = DBAdapter::getStringDelimiter(); $delimiter = DBAdapter::getStringDelimiter();
//Processes //Processes
@@ -5144,7 +5149,7 @@ class Processes
//Check disabled code //Check disabled code
$arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $triggerWebbot); $arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $triggerWebbot);
if (count($arrayFoundDisabledCode) > 0) { if (!empty($arrayFoundDisabledCode)) {
if (!isset($arrayDisabledCode[$processUid])) { if (!isset($arrayDisabledCode[$processUid])) {
$arrayDisabledCode[$processUid] = array( $arrayDisabledCode[$processUid] = array(
"processUid" => $processUid, "processUid" => $processUid,
@@ -5161,6 +5166,7 @@ class Processes
} }
} }
} }
/*----------------------------------********---------------------------------*/
//Return //Return
return $arrayDisabledCode; return $arrayDisabledCode;

View File

@@ -920,25 +920,35 @@ class wsBase
if (!class_exists('System')) { if (!class_exists('System')) {
G::LoadClass('system'); G::LoadClass('system');
} }
$licensedFeatures = & PMLicensedFeatures::getSingleton();
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
if (!empty($config) && $licensedFeatures->verifyfeature('nKaNTNuT1MzK0RsMEtXTnYzR09ucHF2WGNuS0hRdDBBak42WXJhNVVOOG1INEVoaU1EaTllbjBBeEJNeG9wRVJ6NmxQelhyVTBvdThzPQ==')) { if (PMLicensedFeatures::getSingleton()->verifyfeature("zIKRGpDM3pjcHFsWGplNDN0dTl5bGN3UTNiOWdQU0E5Q05QTksrU1ladWQ0VT0=")) {
if(!is_array($config)){ $arrayConfigAux = array();
$emailServer = new EmailServer();
$criteria = $emailServer->getSelAllColumns(); if (is_array($config)) {
$criteria->add(EmailServerPeer::MESS_UID, $config, CRITERIA::EQUAL); $arrayConfigAux = $config;
$criteria = EmailServerPeer::doSelectRS($criteria); } else {
$criteria->setFetchmode(ResultSet::FETCHMODE_ASSOC); $emailServer = new \ProcessMaker\BusinessModel\EmailServer();
while ($criteria->next()) {
$row = $criteria->getRow(); $criteria = $emailServer->getEmailServerCriteria();
$config = $row;
$config['SMTPSecure'] = $row['SMTPSECURE']; $criteria->add(EmailServerPeer::MESS_UID, $config, Criteria::EQUAL);
$rsCriteria = EmailServerPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
if ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
$arrayConfigAux = $row;
$arrayConfigAux["SMTPSecure"] = $row["SMTPSECURE"];
} }
} }
$aSetup = $config;
$aSetup = (!empty($arrayConfigAux))? $arrayConfigAux : System::getEmailConfiguration();
} else { } else {
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
$aSetup = System::getEmailConfiguration(); $aSetup = (is_array($config) && !empty($config))? $config : System::getEmailConfiguration();
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
} }
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/

View File

@@ -796,9 +796,10 @@ class workspaceTools
$arrayData = array(); $arrayData = array();
$emailSever = new \ProcessMaker\BusinessModel\EmailServer(); $emailSever = new \ProcessMaker\BusinessModel\EmailServer();
$emailConfiguration = System::getEmailConfiguration(); $emailConfiguration = System::getEmailConfiguration();
if (count($emailConfiguration) > 0) { if (!empty($emailConfiguration)) {
$arrayData["MESS_ENGINE"] = $emailConfiguration["MESS_ENGINE"]; $arrayData["MESS_ENGINE"] = $emailConfiguration["MESS_ENGINE"];
switch ($emailConfiguration["MESS_ENGINE"]) { switch ($emailConfiguration["MESS_ENGINE"]) {
@@ -830,9 +831,7 @@ class workspaceTools
$arrayData = $emailSever->create($arrayData); $arrayData = $emailSever->create($arrayData);
} else { } else {
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
if (true) { if (!PMLicensedFeatures::getSingleton()->verifyfeature("zIKRGpDM3pjcHFsWGplNDN0dTl5bGN3UTNiOWdQU0E5Q05QTksrU1ladWQ0VT0=")) {
//
} else {
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
$arrayData["MESS_ENGINE"] = "MAIL"; $arrayData["MESS_ENGINE"] = "MAIL";
$arrayData["MESS_SERVER"] = ""; $arrayData["MESS_SERVER"] = "";
@@ -2202,5 +2201,28 @@ class workspaceTools
return true; return true;
} }
} }
/**
* Verify feature
*
* @param string $featureName Feature name
*
* return bool Return true if is valid the feature, false otherwise
*/
public function pmLicensedFeaturesVerifyFeature($featureName)
{
try {
$this->initPropel(true);
$flag = PMLicensedFeatures::getSingleton()->verifyfeature($featureName);
$this->close();
//Return
return $flag;
} catch (Exception $e) {
throw $e;
}
}
} }

View File

@@ -1,27 +1,5 @@
<?php <?php
class EmailServer extends BaseEmailServer class EmailServer extends BaseEmailServer
{ {
/**
* Get all columns by EMAIL_SERVER
*
* @return object criteria
*/
public function getSelAllColumns(){
$criteria = new Criteria("workflow");
$criteria->addSelectColumn( EmailServerPeer::MESS_UID);
$criteria->addSelectColumn( EmailServerPeer::MESS_ENGINE);
$criteria->addSelectColumn( EmailServerPeer::MESS_SERVER);
$criteria->addSelectColumn( EmailServerPeer::MESS_PORT);
$criteria->addSelectColumn( EmailServerPeer::MESS_RAUTH);
$criteria->addSelectColumn( EmailServerPeer::MESS_ACCOUNT);
$criteria->addSelectColumn( EmailServerPeer::MESS_PASSWORD);
$criteria->addSelectColumn( EmailServerPeer::MESS_FROM_MAIL);
$criteria->addSelectColumn( EmailServerPeer::MESS_FROM_NAME);
$criteria->addSelectColumn( EmailServerPeer::SMTPSECURE);
$criteria->addSelectColumn( EmailServerPeer::MESS_TRY_SEND_INMEDIATLY);
$criteria->addSelectColumn( EmailServerPeer::MAIL_TO);
$criteria->addSelectColumn( EmailServerPeer::MESS_DEFAULT);
return $criteria;
}
} }

View File

@@ -66,7 +66,7 @@ class Designer extends Controller
if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) { if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) {
$consolidated = 1; $consolidated = 1;
} }
$enterprise = 1; $enterprise = ($licensedFeatures->verifyfeature("Jb0N3dSZHVhZ1JNOEFZaElqdm15Y050Wmh5S0FEVEI0ckQ="))? 1 : 0;
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
$this->setVar('prj_uid', $proUid); $this->setVar('prj_uid', $proUid);

View File

@@ -18,5 +18,9 @@ $headPublisher->addContent("emailServer/emailServer"); //Adding a HTML file
$headPublisher->addExtJsScript("emailServer/emailServer", false); //Adding a JavaScript file $headPublisher->addExtJsScript("emailServer/emailServer", false); //Adding a JavaScript file
$headPublisher->assign("CONFIG", $arrayConfig); $headPublisher->assign("CONFIG", $arrayConfig);
/*----------------------------------********---------------------------------*/
$headPublisher->assign("EMAILSERVER_LICENSED", (PMLicensedFeatures::getSingleton()->verifyfeature("zIKRGpDM3pjcHFsWGplNDN0dTl5bGN3UTNiOWdQU0E5Q05QTksrU1ladWQ0VT0="))? 1 : 0);
/*----------------------------------********---------------------------------*/
G::RenderPage("publish", "extJs"); G::RenderPage("publish", "extJs");

View File

@@ -26,7 +26,9 @@ use \ProcessMaker\Importer\XmlImporter;
ini_set("max_execution_time", 0); ini_set("max_execution_time", 0);
if (isset($_FILES["PROCESS_FILENAME"]) && /*----------------------------------********---------------------------------*/
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=") &&
isset($_FILES["PROCESS_FILENAME"]) &&
pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION) == "pm" && pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION) == "pm" &&
$_FILES["PROCESS_FILENAME"]["error"] == 0 $_FILES["PROCESS_FILENAME"]["error"] == 0
) { ) {
@@ -39,12 +41,13 @@ if (isset($_FILES["PROCESS_FILENAME"]) &&
$data = unserialize($content); $data = unserialize($content);
fclose($fh); fclose($fh);
if (is_object($data) && isset($data->triggers) && is_array($data->triggers) && count($data->triggers) > 0) { if (is_object($data) && isset($data->triggers) && is_array($data->triggers) && !empty($data->triggers)) {
/*----------------------------------********---------------------------------*/
G::LoadClass("codeScanner"); G::LoadClass("codeScanner");
$arraySystemConfiguration = System::getSystemConfiguration(PATH_CONFIG . "env.ini"); $arraySystemConfiguration = System::getSystemConfiguration(PATH_CONFIG . "env.ini");
$cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : ""); $cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : "");
$strFoundDisabledCode = ""; $strFoundDisabledCode = "";
foreach ($data->triggers as $value) { foreach ($data->triggers as $value) {
@@ -52,7 +55,7 @@ if (isset($_FILES["PROCESS_FILENAME"]) &&
$arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $arrayTriggerData["TRI_WEBBOT"]); $arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $arrayTriggerData["TRI_WEBBOT"]);
if (count($arrayFoundDisabledCode) > 0) { if (!empty($arrayFoundDisabledCode)) {
$strCodeAndLine = ""; $strCodeAndLine = "";
foreach ($arrayFoundDisabledCode["source"] as $key2 => $value2) { foreach ($arrayFoundDisabledCode["source"] as $key2 => $value2) {
@@ -71,7 +74,6 @@ if (isset($_FILES["PROCESS_FILENAME"]) &&
echo G::json_encode($response); echo G::json_encode($response);
exit(0); exit(0);
} }
/*----------------------------------********---------------------------------*/
} }
} catch (Exception $e) { } catch (Exception $e) {
$response["status"] = "ERROR"; $response["status"] = "ERROR";
@@ -82,6 +84,7 @@ if (isset($_FILES["PROCESS_FILENAME"]) &&
exit(0); exit(0);
} }
} }
/*----------------------------------********---------------------------------*/
if (isset($_FILES["PROCESS_FILENAME"]) && if (isset($_FILES["PROCESS_FILENAME"]) &&
pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION) == "pmx" pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION) == "pmx"

View File

@@ -52,17 +52,17 @@ if ($handle = opendir( PATH_PLUGINS )) {
if (is_file(PATH_PLUGINS . $pluginName . ".php") && is_dir(PATH_PLUGINS . $pluginName)) { if (is_file(PATH_PLUGINS . $pluginName . ".php") && is_dir(PATH_PLUGINS . $pluginName)) {
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=")) {
//Check disabled code //Check disabled code
G::LoadClass("codeScanner"); G::LoadClass("codeScanner");
/*----------------------------------********---------------------------------*/
$arraySystemConfiguration = System::getSystemConfiguration(PATH_CONFIG . "env.ini"); $arraySystemConfiguration = System::getSystemConfiguration(PATH_CONFIG . "env.ini");
/*----------------------------------********---------------------------------*/
$cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : ""); $cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : "");
$arrayFoundDisabledCode = array_merge($cs->checkDisabledCode("FILE", PATH_PLUGINS . $pluginName . ".php"), $cs->checkDisabledCode("PATH", PATH_PLUGINS . $pluginName)); $arrayFoundDisabledCode = array_merge($cs->checkDisabledCode("FILE", PATH_PLUGINS . $pluginName . ".php"), $cs->checkDisabledCode("PATH", PATH_PLUGINS . $pluginName));
if (count($arrayFoundDisabledCode) > 0) { if (!empty($arrayFoundDisabledCode)) {
$response = array(); $response = array();
$response["status"] = "DISABLED-CODE"; $response["status"] = "DISABLED-CODE";
$response["message"] = G::LoadTranslation("ID_DISABLED_CODE_PLUGIN"); $response["message"] = G::LoadTranslation("ID_DISABLED_CODE_PLUGIN");
@@ -70,7 +70,9 @@ if ($handle = opendir( PATH_PLUGINS )) {
echo G::json_encode($response); echo G::json_encode($response);
exit(0); exit(0);
} }
}
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
//print "change to ENABLED"; //print "change to ENABLED";
require_once($path); require_once($path);
$details = $oPluginRegistry->getPluginDetails($pluginFile); $details = $oPluginRegistry->getPluginDetails($pluginFile);

View File

@@ -238,18 +238,22 @@ try {
unset( $oClass ); unset( $oClass );
} }
$res = $tar->extract( $path ); $res = $tar->extract( $path );
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=")) {
//Check disabled code //Check disabled code
G::LoadClass("codeScanner"); G::LoadClass("codeScanner");
$arraySystemConfiguration = System::getSystemConfiguration(PATH_CONFIG . "env.ini"); $arraySystemConfiguration = System::getSystemConfiguration(PATH_CONFIG . "env.ini");
$cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : ""); $cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : "");
$arrayFoundDisabledCode = array_merge($cs->checkDisabledCode("FILE", $path . $pluginFile), $cs->checkDisabledCode("PATH", $path . $sClassName)); $arrayFoundDisabledCode = array_merge($cs->checkDisabledCode("FILE", $path . $pluginFile), $cs->checkDisabledCode("PATH", $path . $sClassName));
if (count($arrayFoundDisabledCode) > 0) { if (!empty($arrayFoundDisabledCode)) {
throw new Exception(G::LoadTranslation("ID_DISABLED_CODE_PLUGIN")); throw new Exception(G::LoadTranslation("ID_DISABLED_CODE_PLUGIN"));
} }
}
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
//Check if is enterprise plugin //Check if is enterprise plugin

View File

@@ -67,9 +67,7 @@ if (isset( $sfunction ) && $sfunction == 'lookforNameTrigger') {
echo $flag; echo $flag;
} else { } else {
G::LoadClass("processMap"); G::LoadClass("processMap");
/*----------------------------------********---------------------------------*/
G::LoadClass("codeScanner");
/*----------------------------------********---------------------------------*/
$response = array(); $response = array();
try { try {
@@ -82,15 +80,20 @@ if (isset( $sfunction ) && $sfunction == 'lookforNameTrigger') {
$value = $_POST; $value = $_POST;
} }
if (isset($value["TRI_WEBBOT"])) {
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=") &&
isset($value["TRI_WEBBOT"])
) {
//Check disabled code //Check disabled code
G::LoadClass("codeScanner");
$arraySystemConfiguration = System::getSystemConfiguration(PATH_CONFIG . "env.ini"); $arraySystemConfiguration = System::getSystemConfiguration(PATH_CONFIG . "env.ini");
$cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : ""); $cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : "");
$arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $value["TRI_WEBBOT"]); $arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $value["TRI_WEBBOT"]);
if (count($arrayFoundDisabledCode) > 0) { if (!empty($arrayFoundDisabledCode)) {
$strCodeAndLine = ""; $strCodeAndLine = "";
foreach ($arrayFoundDisabledCode["source"] as $key => $value) { foreach ($arrayFoundDisabledCode["source"] as $key => $value) {
@@ -99,8 +102,9 @@ if (isset( $sfunction ) && $sfunction == 'lookforNameTrigger') {
throw new Exception(G::LoadTranslation("ID_DISABLED_CODE_TRIGGER", array($strCodeAndLine))); throw new Exception(G::LoadTranslation("ID_DISABLED_CODE_TRIGGER", array($strCodeAndLine)));
} }
/*----------------------------------********---------------------------------*/
} }
/*----------------------------------********---------------------------------*/
$swCreate = true; $swCreate = true;
if ($value['TRI_UID'] != '') { if ($value['TRI_UID'] != '') {
$oTrigger->load( $value['TRI_UID'] ); $oTrigger->load( $value['TRI_UID'] );

View File

@@ -49,7 +49,6 @@ emailServer.application = {
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
switch (option) { switch (option) {
case "INS": case "INS":
var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue(); var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue();
@@ -1049,10 +1048,14 @@ emailServer.application = {
var arrayAux1 = []; var arrayAux1 = [];
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
if (EMAILSERVER_LICENSED) {
arrayAux1.push(btnNew); arrayAux1.push(btnNew);
arrayAux1.push("-"); arrayAux1.push("-");
}
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
arrayAux1.push(btnEdit); arrayAux1.push(btnEdit);
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
arrayAux1.push(btnDelete); arrayAux1.push(btnDelete);
arrayAux1.push("->"); arrayAux1.push("->");
@@ -1102,6 +1105,7 @@ emailServer.application = {
var arrayAux2 = []; var arrayAux2 = [];
arrayAux2.push(btnEdit); arrayAux2.push(btnEdit);
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
arrayAux2.push(btnDelete); arrayAux2.push(btnDelete);
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/