Fix class name PmLicenseManager.
This commit is contained in:
David Callizaya
2017-08-11 16:24:12 -04:00
parent fd2786ae1d
commit ab9c67fb47
19 changed files with 31 additions and 30 deletions

View File

@@ -532,7 +532,7 @@ class RBAC
{ {
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
$licenseManager =& pmLicenseManager::getSingleton(); $licenseManager =& PmLicenseManager::getSingleton();
if (in_array(G::encryptOld($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) { if (in_array(G::encryptOld($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) {
return -7; return -7;
} }

View File

@@ -170,7 +170,7 @@ class WorkflowTestCase extends TestCase
throw new \Exception('To continue please put a valid license at features/resources'); throw new \Exception('To continue please put a valid license at features/resources');
} }
G::LoadClass('pmLicenseManager'); G::LoadClass('pmLicenseManager');
$licenseManager = new pmLicenseManager(); $licenseManager = new PmLicenseManager();
$licenseManager->installLicense($licenseFile[0]); $licenseManager->installLicense($licenseFile[0]);
} }

View File

@@ -334,7 +334,7 @@ class PMLicensedFeatures
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
public function verifyfeature ($featureName) public function verifyfeature ($featureName)
{ {
$licenseManager = pmLicenseManager::getSingleton(false); $licenseManager = PmLicenseManager::getSingleton(false);
$_SESSION['__sw__'] = true; $_SESSION['__sw__'] = true;
$padl = new Padl(); $padl = new Padl();

View File

@@ -1207,7 +1207,7 @@ class PMPluginRegistry
//Found a License //Found a License
if (class_exists( 'pmLicenseManager' )) { if (class_exists( 'pmLicenseManager' )) {
$sSerializedFile = PATH_DATA_SITE . 'lmn.singleton'; $sSerializedFile = PATH_DATA_SITE . 'lmn.singleton';
$pmLicenseManagerO = & pmLicenseManager::getSingleton(); $pmLicenseManagerO = & PmLicenseManager::getSingleton();
if (file_exists( $sSerializedFile )) { if (file_exists( $sSerializedFile )) {
$pmLicenseManagerO->unSerializeInstance( file_get_contents( $sSerializedFile ) ); $pmLicenseManagerO->unSerializeInstance( file_get_contents( $sSerializedFile ) );
} }

View File

@@ -11,7 +11,7 @@ use ProcessMaker\Plugins\PluginRegistry;
/** /**
* class.pmLicenseManager.php * class.pmLicenseManager.php
* *
*/class pmLicenseManager */class PmLicenseManager
{ {
private static $instance = null; private static $instance = null;
@@ -120,7 +120,7 @@ use ProcessMaker\Plugins\PluginRegistry;
public static function getSingleton($flagActivatePlugins = true) public static function getSingleton($flagActivatePlugins = true)
{ {
if (self::$instance == null) { if (self::$instance == null) {
self::$instance = new pmLicenseManager($flagActivatePlugins); self::$instance = new PmLicenseManager($flagActivatePlugins);
} }
return self::$instance; return self::$instance;
} }

View File

@@ -222,7 +222,7 @@ class AddonsManager extends BaseAddonsManager
} }
/////// ///////
$licenseManager = &pmLicenseManager::getSingleton(); $licenseManager = &PmLicenseManager::getSingleton();
$activeLicense = $licenseManager->getActiveLicense(); $activeLicense = $licenseManager->getActiveLicense();
$data = $data . "Content-Disposition: form-data; name=\"licenseFile\"; filename=\"" . $licenseManager->file . "\"\n"; $data = $data . "Content-Disposition: form-data; name=\"licenseFile\"; filename=\"" . $licenseManager->file . "\"\n";

View File

@@ -34,7 +34,7 @@ class AddonsStore extends BaseAddonsStore
public static function checkLicenseStore() public static function checkLicenseStore()
{ {
//getting the licenseManager.... //getting the licenseManager....
$licenseManager = &pmLicenseManager::getSingleton(); $licenseManager = &PmLicenseManager::getSingleton();
if (isset($licenseManager->id)) { if (isset($licenseManager->id)) {
//Remove any license store that is not the active license //Remove any license store that is not the active license
@@ -71,7 +71,7 @@ class AddonsStore extends BaseAddonsStore
AddonsStore::checkLicenseStore(); AddonsStore::checkLicenseStore();
$licenseManager = &pmLicenseManager::getSingleton(); //Getting the licenseManager $licenseManager = &PmLicenseManager::getSingleton(); //Getting the licenseManager
$result["store_errors"] = array(); $result["store_errors"] = array();
list($stores, $errors) = AddonsStore::updateAll(false, $type); list($stores, $errors) = AddonsStore::updateAll(false, $type);
@@ -183,7 +183,7 @@ class AddonsStore extends BaseAddonsStore
AddonsStore::checkLicenseStore(); AddonsStore::checkLicenseStore();
$licenseManager = &pmLicenseManager::getSingleton(); //Getting the licenseManager $licenseManager = &PmLicenseManager::getSingleton(); //Getting the licenseManager
$result["store_errors"] = array(); $result["store_errors"] = array();
list($stores, $errors) = AddonsStore::updateAll(false); list($stores, $errors) = AddonsStore::updateAll(false);
@@ -350,7 +350,7 @@ class AddonsStore extends BaseAddonsStore
$aPluginsPP = unserialize(trim(file_get_contents(PATH_DATA_SITE . 'ee'))); $aPluginsPP = unserialize(trim(file_get_contents(PATH_DATA_SITE . 'ee')));
} }
$pmLicenseManagerO = &pmLicenseManager::getSingleton(); $pmLicenseManagerO = &PmLicenseManager::getSingleton();
$localPlugins = array(); $localPlugins = array();
if ($type == 'plugin') { if ($type == 'plugin') {

View File

@@ -1386,7 +1386,7 @@ class adminProxy extends HttpProxyController
$oServerConf = &serverConf::getSingleton(); $oServerConf = &serverConf::getSingleton();
$pluginRegistry = PluginRegistry::loadSingleton(); $pluginRegistry = PluginRegistry::loadSingleton();
$licenseManager = &pmLicenseManager::getSingleton(); $licenseManager = &PmLicenseManager::getSingleton();
//License Information: //License Information:
$activeLicense = $licenseManager->getActiveLicense(); $activeLicense = $licenseManager->getActiveLicense();

View File

@@ -46,7 +46,7 @@ class Main extends Controller
$expireInLabel = ''; $expireInLabel = '';
require_once ("classes" . PATH_SEP . "class.pmLicenseManager.php"); require_once ("classes" . PATH_SEP . "class.pmLicenseManager.php");
$pmLicenseManager = &pmLicenseManager::getSingleton(); $pmLicenseManager = &PmLicenseManager::getSingleton();
$expireIn = $pmLicenseManager->getExpireIn(); $expireIn = $pmLicenseManager->getExpireIn();
$expireInLabel = $pmLicenseManager->getExpireInLabel(); $expireInLabel = $pmLicenseManager->getExpireInLabel();

View File

@@ -255,7 +255,7 @@ if (!file_exists(PATH_DATA_SITE . "plugin.singleton")) {
$enterprise->enable(); $enterprise->enable();
$enterprise->setup(); $enterprise->setup();
} }
$pmLicenseManagerO = &pmLicenseManager::getSingleton(); $pmLicenseManagerO = &PmLicenseManager::getSingleton();
$licenseStatusInfo = $pmLicenseManagerO->getCurrentLicenseStatus(); $licenseStatusInfo = $pmLicenseManagerO->getCurrentLicenseStatus();
$licStatusMsg = null; $licStatusMsg = null;

View File

@@ -2,7 +2,7 @@
AddonsStore::checkLicenseStore(); AddonsStore::checkLicenseStore();
$licenseManager = &pmLicenseManager::getSingleton(); $licenseManager = &PmLicenseManager::getSingleton();
$oHeadPublisher = &headPublisher::getSingleton(); $oHeadPublisher = &headPublisher::getSingleton();
if (isset($licenseManager->date) && is_array($licenseManager->date)) { if (isset($licenseManager->date) && is_array($licenseManager->date)) {

View File

@@ -51,12 +51,12 @@ try {
$dir = PATH_DATA_SITE; $dir = PATH_DATA_SITE;
G::uploadFile($aInfoLoadFile["tmp_name"], $dir, $aInfoLoadFile["name"]); G::uploadFile($aInfoLoadFile["tmp_name"], $dir, $aInfoLoadFile["name"]);
//reading the file that was uploaded //reading the file that was uploaded
$oPmLicenseManager = &pmLicenseManager::getSingleton(); $oPmLicenseManager = &PmLicenseManager::getSingleton();
$response = $oPmLicenseManager->installLicense($dir . $aInfoLoadFile["name"]); $response = $oPmLicenseManager->installLicense($dir . $aInfoLoadFile["name"]);
/////// ///////
//This command also find the following file "AddonsStore.php" //This command also find the following file "AddonsStore.php"
$licenseManager = &pmLicenseManager::getSingleton(); $licenseManager = &PmLicenseManager::getSingleton();
preg_match("/^license_(.*).dat$/", $licenseManager->file, $matches); preg_match("/^license_(.*).dat$/", $licenseManager->file, $matches);
$realId = urlencode($matches[1]); $realId = urlencode($matches[1]);
@@ -210,7 +210,7 @@ try {
} }
/////// ///////
$licenseManager = &pmLicenseManager::getSingleton(); $licenseManager = &PmLicenseManager::getSingleton();
$server = $licenseManager->server; $server = $licenseManager->server;
$workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv'; $workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv';
$url = "http://$server/sys".$workspace."/en/green/services/rest"; $url = "http://$server/sys".$workspace."/en/green/services/rest";

View File

@@ -133,7 +133,7 @@ class enterprisePlugin extends PMPlugin
require_once (PATH_CORE . 'classes/model/AddonsStore.php'); require_once (PATH_CORE . 'classes/model/AddonsStore.php');
AddonsStore::checkLicenseStore(); AddonsStore::checkLicenseStore();
$licenseManager = &pmLicenseManager::getSingleton(); $licenseManager = &PmLicenseManager::getSingleton();
AddonsStore::updateAll(false); AddonsStore::updateAll(false);
} }

View File

@@ -116,7 +116,7 @@ switch ($option) {
} }
/////// ///////
$licenseManager = &pmLicenseManager::getSingleton(); $licenseManager = &PmLicenseManager::getSingleton();
$server = isset($licenseManager->server) ? $licenseManager->server : ''; $server = isset($licenseManager->server) ? $licenseManager->server : '';
$workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv'; $workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv';
@@ -292,7 +292,7 @@ switch ($option) {
} }
/////// ///////
$licenseManager = &pmLicenseManager::getSingleton(); $licenseManager = &PmLicenseManager::getSingleton();
$server = (isset($licenseManager->server)) ? $licenseManager->server : ''; $server = (isset($licenseManager->server)) ? $licenseManager->server : '';
$workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv'; $workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv';

View File

@@ -15,11 +15,11 @@ if ($aux['extension'] != 'dat') {
G::uploadFile($aInfoLoadFile["tmp_name"], $dir, $aInfoLoadFile["name"]); G::uploadFile($aInfoLoadFile["tmp_name"], $dir, $aInfoLoadFile["name"]);
//reading the file that was uploaded //reading the file that was uploaded
$licenseManager =& pmLicenseManager::getSingleton(); $licenseManager =& PmLicenseManager::getSingleton();
$response = $licenseManager->installLicense($dir . $aInfoLoadFile["name"], false, false); $response = $licenseManager->installLicense($dir . $aInfoLoadFile["name"], false, false);
if ($response) { if ($response) {
$licenseManager = new pmLicenseManager(); $licenseManager = new PmLicenseManager();
preg_match("/^license_(.*).dat$/", $licenseManager->file, $matches); preg_match("/^license_(.*).dat$/", $licenseManager->file, $matches);
$realId = urlencode($matches[1]); $realId = urlencode($matches[1]);
$workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv'; $workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv';

View File

@@ -208,7 +208,7 @@ $_SESSION['NW_PASSWORD2'] = $pass1;
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
$licenseManager =& pmLicenseManager::getSingleton(); $licenseManager =& PmLicenseManager::getSingleton();
if (in_array(G::encryptOld($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) { if (in_array(G::encryptOld($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) {
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION'))); $version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));

View File

@@ -105,12 +105,12 @@ try {
require_once ('classes/model/AddonsStore.php'); require_once ('classes/model/AddonsStore.php');
AddonsStore::checkLicenseStore(); AddonsStore::checkLicenseStore();
$licenseManager = &pmLicenseManager::getSingleton(); $licenseManager = &PmLicenseManager::getSingleton();
AddonsStore::updateAll(false); AddonsStore::updateAll(false);
$message = G::loadTranslation( 'ID_ENTERPRISE_INSTALLED') . ' ' . G::loadTranslation( 'ID_LOG_AGAIN'); $message = G::loadTranslation( 'ID_ENTERPRISE_INSTALLED') . ' ' . G::loadTranslation( 'ID_LOG_AGAIN');
G::SendMessageText($message, "INFO"); G::SendMessageText($message, "INFO");
$licenseManager = &pmLicenseManager::getSingleton(); $licenseManager = &PmLicenseManager::getSingleton();
die('<script type="text/javascript">parent.parent.location = "../login/login";</script>'); die('<script type="text/javascript">parent.parent.location = "../login/login";</script>');
} }
} }
@@ -179,12 +179,12 @@ try {
require_once ('classes/model/AddonsStore.php'); require_once ('classes/model/AddonsStore.php');
AddonsStore::checkLicenseStore(); AddonsStore::checkLicenseStore();
$licenseManager = &pmLicenseManager::getSingleton(); $licenseManager = &PmLicenseManager::getSingleton();
AddonsStore::updateAll(false); AddonsStore::updateAll(false);
$message = G::loadTranslation( 'ID_ENTERPRISE_INSTALLED') . ' ' . G::loadTranslation( 'ID_LOG_AGAIN'); $message = G::loadTranslation( 'ID_ENTERPRISE_INSTALLED') . ' ' . G::loadTranslation( 'ID_LOG_AGAIN');
G::SendMessageText($message, "INFO"); G::SendMessageText($message, "INFO");
$licenseManager = &pmLicenseManager::getSingleton(); $licenseManager = &PmLicenseManager::getSingleton();
die('<script type="text/javascript">parent.parent.location = "../login/login";</script>'); die('<script type="text/javascript">parent.parent.location = "../login/login";</script>');
} }
} }

View File

@@ -757,7 +757,7 @@ class SkinEngine
} }
if (defined('SYS_SYS')) { if (defined('SYS_SYS')) {
$pmLicenseManagerO = &pmLicenseManager::getSingleton(); $pmLicenseManagerO = &PmLicenseManager::getSingleton();
$expireIn = $pmLicenseManagerO->getExpireIn(); $expireIn = $pmLicenseManagerO->getExpireIn();
$expireInLabel = $pmLicenseManagerO->getExpireInLabel(); $expireInLabel = $pmLicenseManagerO->getExpireInLabel();

View File

@@ -8,6 +8,7 @@ use UsersPeer;
use AppDelegationPeer; use AppDelegationPeer;
use AppDelayPeer; use AppDelayPeer;
use ProcessMaker\Util\DateTime; use ProcessMaker\Util\DateTime;
use PmLicenseManager;
class Light class Light
{ {
@@ -779,7 +780,7 @@ class Light
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
$licenseManager =& \pmLicenseManager::getSingleton(); $licenseManager =& PmLicenseManager::getSingleton();
if (in_array(md5($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) { if (in_array(md5($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) {
$G_PUBLISH = new \Publisher(); $G_PUBLISH = new \Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/licenseExpired', '', array(), 'licenseUpdate'); $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/licenseExpired', '', array(), 'licenseUpdate');