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

@@ -795,10 +795,11 @@ class workspaceTools
//Insert the first record
$arrayData = array();
$emailSever = new \ProcessMaker\BusinessModel\EmailServer();
$emailSever = new \ProcessMaker\BusinessModel\EmailServer();
$emailConfiguration = System::getEmailConfiguration();
if (count($emailConfiguration) > 0) {
if (!empty($emailConfiguration)) {
$arrayData["MESS_ENGINE"] = $emailConfiguration["MESS_ENGINE"];
switch ($emailConfiguration["MESS_ENGINE"]) {
@@ -830,18 +831,16 @@ class workspaceTools
$arrayData = $emailSever->create($arrayData);
} else {
/*----------------------------------********---------------------------------*/
if (true) {
//
} else {
if (!PMLicensedFeatures::getSingleton()->verifyfeature("zIKRGpDM3pjcHFsWGplNDN0dTl5bGN3UTNiOWdQU0E5Q05QTksrU1ladWQ0VT0=")) {
/*----------------------------------********---------------------------------*/
$arrayData["MESS_ENGINE"] = "MAIL";
$arrayData["MESS_SERVER"] = "";
$arrayData["MESS_ACCOUNT"] = "";
$arrayData["MESS_PASSWORD"] = "";
$arrayData["MAIL_TO"] = "";
$arrayData["MESS_DEFAULT"] = 1;
$arrayData["MESS_ENGINE"] = "MAIL";
$arrayData["MESS_SERVER"] = "";
$arrayData["MESS_ACCOUNT"] = "";
$arrayData["MESS_PASSWORD"] = "";
$arrayData["MAIL_TO"] = "";
$arrayData["MESS_DEFAULT"] = 1;
$arrayData = $emailSever->create2($arrayData);
$arrayData = $emailSever->create2($arrayData);
/*----------------------------------********---------------------------------*/
}
/*----------------------------------********---------------------------------*/
@@ -2202,5 +2201,28 @@ class workspaceTools
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;
}
}
}