PM-399 Las funcionalidades del enterprise ya no tiene SOLVED
- A validation was added when use plugin.singleton.
This commit is contained in:
@@ -24,7 +24,7 @@ class enterprisePlugin extends PMPlugin
|
||||
$this->sFriendlyName = "ProcessMaker Enterprise Edition";
|
||||
$this->sDescription = "ProcessMaker Enterprise Edition $VERSION";
|
||||
$this->sPluginFolder = "enterprise";
|
||||
$this->sSetupPage = "../enterprise/pluginsList.php";
|
||||
$this->sSetupPage = "../enterprise/addonsStore.php";
|
||||
$this->iVersion = $VERSION;
|
||||
$this->iPMVersion = "2.0.31";
|
||||
$this->aDependences = null;
|
||||
@@ -119,11 +119,12 @@ class enterprisePlugin extends PMPlugin
|
||||
|
||||
public function setup()
|
||||
{
|
||||
$this->registerMenu("setup", "menuEnterprise.php");
|
||||
////including the file inside the enterprise folder
|
||||
require_once PATH_CORE . 'classes' . PATH_SEP . 'class.pmLicenseManager.php';
|
||||
$this->registerTrigger(PM_LOGIN, "enterpriseSystemUpdate");
|
||||
$this->registerTrigger(PM_HASH_PASSWORD, 'setHashPassword');
|
||||
if (!file_exists(PATH_DATA_SITE . "plugin.singleton")) {
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginDetail = $pluginRegistry->getPluginDetails("enterprise.php");
|
||||
$pluginRegistry->enablePlugin($pluginDetail->sNamespace);
|
||||
file_put_contents(PATH_DATA_SITE . "plugin.singleton", $pluginRegistry->serializeInstance());
|
||||
}
|
||||
}
|
||||
|
||||
public function enable()
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
global $G_TMP_MENU;
|
||||
|
||||
if (class_exists("pmLicenseManager")) {
|
||||
$pmLicenseManagerO = &pmLicenseManager::getSingleton();
|
||||
$licenseStatusInfo = $pmLicenseManagerO->getCurrentLicenseStatus();
|
||||
$licStatusMsg = null;
|
||||
|
||||
if ((isset($pmLicenseManagerO->plan)) && ($pmLicenseManagerO->plan != "")) {
|
||||
$lines = explode(" - ", $pmLicenseManagerO->plan);
|
||||
if (isset($lines[0])) {
|
||||
$licStatusMsg .= "<br><i><small> " . $lines[0] . "</small></i>";
|
||||
}
|
||||
if ((isset($lines[1])) && ($lines[1] != $lines[0])) {
|
||||
$licStatusMsg .= "<br><i><small> " . $lines[1] . "</small></i>";
|
||||
}
|
||||
}
|
||||
|
||||
if ($licenseStatusInfo["message"] != "") {
|
||||
$licStatusMsg = " <font color=\"red\">(" . $licenseStatusInfo["message"] . ")</font>";
|
||||
}
|
||||
|
||||
$G_TMP_MENU->AddIdRawOption("PMENTERPRISE", "../enterprise/addonsStore", G::LoadTranslation('ID_MENU_NAME') . $licStatusMsg, "", "", "plugins");
|
||||
|
||||
if (isset($pmLicenseManagerO->result) && ($pmLicenseManagerO->result == "OK")) {
|
||||
if (file_exists(PATH_HOME . "engine" . PATH_SEP . "methods" . PATH_SEP . "cases" . PATH_SEP . "casesListExtJs.php")) {
|
||||
$G_TMP_MENU->AddIdRawOption("CASES_LIST_SETUP", "../cases/casesListSetup", G::LoadTranslation('ID_CASES_LIST'), "", "", "settings");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,12 +42,11 @@ try {
|
||||
|
||||
require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php';
|
||||
|
||||
$enterprise = new enterprisePlugin('enterprise');
|
||||
|
||||
if (!file_exists(PATH_DATA_SITE . "plugin.singleton")) {
|
||||
$enterprise = new enterprisePlugin('enterprise');
|
||||
$enterprise->enable();
|
||||
$enterprise->setup();
|
||||
}
|
||||
$enterprise->setup();
|
||||
$uid = $RBAC->VerifyLogin($usr , $pwd);
|
||||
$RBAC->cleanSessionFiles(72); //cleaning session files older than 72 hours
|
||||
|
||||
@@ -161,11 +160,13 @@ try {
|
||||
|
||||
//Execute the SSO Script from plugin
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$lSession="";
|
||||
$loginInfo = new loginInfo ($usr, $pwd, $lSession );
|
||||
if ($oPluginRegistry->existsTrigger ( PM_LOGIN )) {
|
||||
$lSession="";
|
||||
$loginInfo = new loginInfo ($usr, $pwd, $lSession );
|
||||
$oPluginRegistry->executeTriggers ( PM_LOGIN , $loginInfo );
|
||||
}
|
||||
G::LoadClass("enterprise");
|
||||
enterpriseClass::enterpriseSystemUpdate($loginInfo);
|
||||
$_SESSION['USER_LOGGED'] = $uid;
|
||||
$_SESSION['USR_USERNAME'] = $usr;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user