Removing deprecated references and files
This commit is contained in:
@@ -22,7 +22,6 @@ return array(
|
||||
'Dashboards' => Dashboards::class,
|
||||
'dashletOpenVSCompleted' => DashletOpenVsCompleted::class,
|
||||
'dashletProcessMakerCommunity' => DashletProcessMakerCommunity::class,
|
||||
'dashletProcessMakerEnterprise' => DashletProcessMakerEnterprise::class,
|
||||
'dashletRssReader' => DashletRssReader::class,
|
||||
'dates' => Dates::class,
|
||||
'dbConnections' => DbConnections::class,
|
||||
@@ -31,8 +30,6 @@ return array(
|
||||
'dynaformEditorAjax' => DynaformEditorAjax::class,
|
||||
'DynaFormField' => DynaFormField::class,
|
||||
'dynaformHandler' => DynaformHandler::class,
|
||||
'enterpriseClass' => EnterpriseClass::class,
|
||||
'EnterpriseUtils' => EnterpriseUtils::class,
|
||||
'featuresDetail' => FeaturesDetail::class,
|
||||
'FieldValidator' => FieldValidator::class,
|
||||
'FileCache' => FileCache::class,
|
||||
@@ -46,7 +43,6 @@ return array(
|
||||
'JavaBridgePM' => JavaBridgePM::class,
|
||||
'labelsGmail' => labelsGmail::class,
|
||||
'ldapAdvanced' => LdapAdvanced::class,
|
||||
'License_Application' => license_application::class,
|
||||
'multipleFilesBackup' => MultipleFilesBackup::class,
|
||||
'NET' => Net::class,
|
||||
'p11835' => P11835::class,
|
||||
@@ -57,7 +53,6 @@ return array(
|
||||
'pmDynaform' => PmDynaform::class,
|
||||
'pmGauge' => PmGauge::class,
|
||||
'PMGoogleApi' => PmGoogleApi::class,
|
||||
'pmLicenseManager' => PmLicenseManager::class,
|
||||
'PMmemcached' => PMmemcached::class,
|
||||
'pmPhing' => PmPhing::class,
|
||||
'PMPlugin' => PMPlugin::class,
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class LicenseManagerFactory extends Factory
|
||||
{
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
"LICENSE_UID" => $this->faker->regexify("/[a-zA-Z]{32}/"),
|
||||
"LICENSE_USER" => $this->faker->name,
|
||||
"LICENSE_START" => 0,
|
||||
"LICENSE_END" => 0,
|
||||
"LICENSE_SPAN" => 0,
|
||||
"LICENSE_STATUS" => 'ACTIVE',
|
||||
"LICENSE_DATA" => '',
|
||||
"LICENSE_PATH" => '',
|
||||
"LICENSE_WORKSPACE" => '',
|
||||
"LICENSE_TYPE" => 'ONPREMISE'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
@@ -53,7 +53,6 @@ class FeatureContext extends WorkflowTestCase implements Context
|
||||
public function aNewWorkspace()
|
||||
{
|
||||
$this->setupDB();
|
||||
$this->installLicense(__DIR__.'/../resources/license_*.dat');
|
||||
$this->config(['CFG_UID' => 'getStarted', 'CFG_VALUE' => '1']);
|
||||
$this->setTranslation('ID_INVALID_VALUE_CAN_NOT_BE_EMPTY',
|
||||
'ID_INVALID_VALUE_CAN_NOT_BE_EMPTY({0})');
|
||||
|
||||
@@ -115,7 +115,7 @@ class Common
|
||||
|
||||
/**
|
||||
* Maintained for compatibility reasons with the plugin DataReportingTool
|
||||
* @deprecated 3.2.2, by backward compatibility because it is used in plugins enterprise
|
||||
* @deprecated 3.2.2, by backward compatibility because it is used in plugins
|
||||
*
|
||||
*/
|
||||
public static function getLastVersion($pattern, $flag = 0)
|
||||
|
||||
@@ -44,7 +44,7 @@ pake_task('new-plugin', 'project_exists');
|
||||
pake_desc("Update the plugin attributes in all workspaces\n args: <plugin-name>");
|
||||
pake_task("update-plugin-attributes", "project_exists");
|
||||
|
||||
pake_desc("Check disabled code in plugins\n args: [enterprise-plugin|custom-plugin|all|<plugin-name>]");
|
||||
pake_desc("Check disabled code in plugins\n args: [custom-plugin|all|<plugin-name>]");
|
||||
pake_task("check-plugin-disabled-code", "project_exists");
|
||||
|
||||
pake_desc("pack plugin in .tar file \n args: <plugin>");
|
||||
@@ -2335,8 +2335,6 @@ function run_check_plugin_disabled_code($task, $args)
|
||||
$option2 = strtoupper($option);
|
||||
|
||||
switch ($option2) {
|
||||
case "ENTERPRISE-PLUGIN":
|
||||
break;
|
||||
case "CUSTOM-PLUGIN":
|
||||
case "ALL":
|
||||
case "":
|
||||
@@ -2365,11 +2363,6 @@ function run_check_plugin_disabled_code($task, $args)
|
||||
$pluginParentClassName = $arrayMatch[1];
|
||||
|
||||
switch ($option2) {
|
||||
case "ENTERPRISE-PLUGIN":
|
||||
if ($pluginParentClassName == "enterprisePlugin") {
|
||||
$arrayData[] = $pluginName;
|
||||
}
|
||||
break;
|
||||
case "CUSTOM-PLUGIN":
|
||||
case "ALL":
|
||||
case "":
|
||||
|
||||
@@ -35,7 +35,6 @@ class G
|
||||
'ldapadvanced' => LdapAdvanced::class,
|
||||
'dashletopenvscompleted' => DashletOpenVsCompleted::class,
|
||||
'dashletrssreader' => DashletRssReader::class,
|
||||
'dashletprocessmakerenterprise' => DashletProcessMakerEnterprise::class,
|
||||
'dashletprocessmakercommunity' => DashletProcessMakerCommunity::class,
|
||||
];
|
||||
|
||||
@@ -6135,11 +6134,9 @@ class G
|
||||
*/
|
||||
public static function defineConstants()
|
||||
{
|
||||
//Moved from Enterprise class.
|
||||
if (file_exists(PATH_METHODS . "login/version-pmos.php")) {
|
||||
include(PATH_METHODS . "login/version-pmos.php");
|
||||
}
|
||||
//Removed default version from code.
|
||||
|
||||
/**
|
||||
* The constants defined comes from the file:
|
||||
|
||||
@@ -104,7 +104,6 @@ abstract class TestCase extends BaseTestCase
|
||||
'DASHLET_INSTANCE',
|
||||
'CONFIGURATION',
|
||||
'CATALOG',
|
||||
'ADDONS_MANAGER',
|
||||
'APP_SEQUENCE',
|
||||
'OAUTH_CLIENTS',
|
||||
'OAUTH_ACCESS_TOKENS'
|
||||
|
||||
@@ -168,23 +168,6 @@ class WorkflowTestCase extends TestCaseFramework
|
||||
$this->setEnvIni($param, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Installa an licese file.
|
||||
*
|
||||
* @param type $path
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function installLicense($path)
|
||||
{
|
||||
$licenseFile = glob($path);
|
||||
if (!$licenseFile) {
|
||||
throw new \Exception('To continue please put a valid license at features/resources');
|
||||
}
|
||||
G::LoadClass('pmLicenseManager');
|
||||
$licenseManager = new PmLicenseManager();
|
||||
$licenseManager->installLicense($licenseFile[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a PM configuration.
|
||||
*
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{
|
||||
"__SYSTEM_UTC_TIME_ZONE__": true,
|
||||
"__EE_INSTALLATION__": 242,
|
||||
"__EE_SW_PMLICENSEMANAGER__": "1",
|
||||
"phpLastFileFound": "\/sysworkflow\/en\/neoclassic\/gulliver\/defaultAjaxDynaform",
|
||||
"USERNAME_PREVIOUS1": "",
|
||||
"USERNAME_PREVIOUS2": "admin",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -5,7 +5,6 @@ namespace Tests\unit\workflow\engine\methods\services;
|
||||
use Carbon\Carbon;
|
||||
use G;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use PmLicenseManager;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ActionsByEmailDataFormTest extends TestCase
|
||||
@@ -66,10 +65,6 @@ class ActionsByEmailDataFormTest extends TestCase
|
||||
$_GET["ABER"] = G::encrypt($delegation->APP_UID, URL_KEY);
|
||||
$_GET["BROWSER_TIME_ZONE_OFFSET"] = "-14400";
|
||||
$_REQUEST = $_GET;
|
||||
$cached = [
|
||||
'zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=' => true
|
||||
];
|
||||
Cache::put(PmLicenseManager::CACHE_KEY . '.' . config("system.workspace"), $cached, Carbon::now()->addDay(1));
|
||||
|
||||
ob_start();
|
||||
$fileName = PATH_METHODS . 'services/ActionsByEmailDataForm.php';
|
||||
|
||||
@@ -6,7 +6,6 @@ use Carbon\Carbon;
|
||||
use Exception;
|
||||
use G;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use PmLicenseManager;
|
||||
use ProcessMaker\Importer\XmlImporter;
|
||||
use ProcessMaker\Model\Groupwf;
|
||||
use ProcessMaker\Model\User;
|
||||
@@ -24,9 +23,6 @@ class XmlImporterTest extends TestCase
|
||||
parent::setUp();
|
||||
$this->user = User::factory()->create();
|
||||
Groupwf::truncate();
|
||||
|
||||
$cached = ["jXsSi94bkRUcVZyRStNVExlTXhEclVadGRRcG9xbjNvTWVFQUF3cklKQVBiVT0=" => 1];
|
||||
Cache::put(PmLicenseManager::CACHE_KEY . '.' . config("system.workspace"), $cached, Carbon::now()->addDay(1));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -583,8 +583,7 @@ function synchronizeDrive()
|
||||
if (strpos($argvx, "synchronize-documents-drive") === false) {
|
||||
return false;
|
||||
}
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) {
|
||||
|
||||
$drive = new AppDocumentDrive();
|
||||
if ($drive->getStatusDrive()) {
|
||||
setExecutionMessage("Synchronize documents to Drive");
|
||||
@@ -592,9 +591,7 @@ function synchronizeDrive()
|
||||
} else {
|
||||
setExecutionMessage("It has not enabled Feature Drive");
|
||||
}
|
||||
} else {
|
||||
setExecutionMessage("The Drive license is not enabled");
|
||||
}
|
||||
|
||||
setExecutionResultMessage("DONE");
|
||||
} catch (Exception $e) {
|
||||
setExecutionResultMessage("WITH ERRORS", "error");
|
||||
@@ -611,8 +608,7 @@ function synchronizeGmailLabels()
|
||||
if (strpos($argvx, "synchronize-gmail-labels") === false) {
|
||||
return false;
|
||||
}
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
|
||||
|
||||
$pmGoogle = new PmGoogleApi();
|
||||
if ($pmGoogle->getServiceGmailStatus()) {
|
||||
setExecutionMessage("Synchronize labels in Gmail");
|
||||
@@ -621,9 +617,7 @@ function synchronizeGmailLabels()
|
||||
} else {
|
||||
setExecutionMessage("It has not enabled Feature Gmail");
|
||||
}
|
||||
} else {
|
||||
setExecutionMessage("The Gmail license is not enabled");
|
||||
}
|
||||
|
||||
setExecutionResultMessage("DONE");
|
||||
} catch (Exception $e) {
|
||||
setExecutionResultMessage("WITH ERRORS", "error");
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
<?php
|
||||
|
||||
CLI::taskName('change-password-hash-method');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Change password hash method to md5 or sha256 for the specified workspace
|
||||
EOT
|
||||
);
|
||||
CLI::taskArg('workspace', false);
|
||||
CLI::taskArg('hash', false);
|
||||
CLI::taskRun("change_hash");
|
||||
|
||||
function run_addon_core_install($args)
|
||||
{
|
||||
try {
|
||||
$workspace = $args[0];
|
||||
$storeId = $args[1];
|
||||
$addonName = $args[2];
|
||||
|
||||
if (empty(config("system.workspace"))) {
|
||||
define("SYS_SYS", $workspace);
|
||||
config(["system.workspace" => $workspace]);
|
||||
}
|
||||
if (!defined("PATH_DATA_SITE")) {
|
||||
define("PATH_DATA_SITE", PATH_DATA . "sites/" . config("system.workspace") . "/");
|
||||
}
|
||||
if (!defined("DB_ADAPTER")) {
|
||||
define("DB_ADAPTER", $args[3]);
|
||||
}
|
||||
|
||||
$ws = new WorkspaceTools($workspace);
|
||||
$ws->initPropel(false);
|
||||
|
||||
require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php';
|
||||
|
||||
$addon = AddonsManagerPeer::retrieveByPK($addonName, $storeId);
|
||||
if ($addon == null) {
|
||||
throw new Exception("Id $addonName not found in store $storeId");
|
||||
}
|
||||
|
||||
$addon->download();
|
||||
$addon->install();
|
||||
|
||||
if ($addon->isCore()) {
|
||||
$ws = new WorkspaceTools($workspace);
|
||||
$ws->initPropel(false);
|
||||
$addon->setState("install-finish");
|
||||
} else {
|
||||
$addon->setState();
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$addon->setState("error");
|
||||
}
|
||||
}
|
||||
|
||||
function change_hash($command, $opts)
|
||||
{
|
||||
if (count($command) < 2) {
|
||||
$hash = 'md5';
|
||||
} else {
|
||||
$hash = array_pop($command);
|
||||
}
|
||||
$workspaces = get_workspaces_from_args($command);
|
||||
|
||||
foreach ($workspaces as $workspace) {
|
||||
CLI::logging("Checking workspace: ".pakeColor::colorize($workspace->name, "INFO")."\n");
|
||||
try {
|
||||
$response = new stdclass();
|
||||
$response->workspace = $workspace;
|
||||
$response->hash = $hash;
|
||||
if (empty(config("system.workspace"))) {
|
||||
define("SYS_SYS", $workspace->name);
|
||||
config(["system.workspace" => $workspace->name]);
|
||||
}
|
||||
if (!defined("PATH_DATA_SITE")) {
|
||||
define("PATH_DATA_SITE", PATH_DATA . "sites/" . config("system.workspace") . "/");
|
||||
}
|
||||
$_SESSION['__sw__'] = '';
|
||||
if (!$workspace->changeHashPassword($workspace->name, $response)) {
|
||||
CLI::logging(pakeColor::colorize("This command cannot be used because your license does not include it.", "ERROR") . "\n");
|
||||
$workspace->close();
|
||||
die;
|
||||
}
|
||||
$workspace->close();
|
||||
CLI::logging(pakeColor::colorize("Changed...", "ERROR") . "\n");
|
||||
} catch (Exception $e) {
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
G::outRes( "> Error: " . CLI::error(G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token))) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,11 +86,6 @@ function run_upgrade($parameters, $args)
|
||||
$workspace->removeDeprecatedFiles();
|
||||
CLI::logging("* End to remove deprecated files...(Completed on " . (microtime(true) - $start) . " seconds)\n");
|
||||
|
||||
CLI::logging("* Start checking Enterprise folder/files...\n");
|
||||
$start = microtime(true);
|
||||
$workspace->verifyFilesOldEnterprise();
|
||||
CLI::logging("* End checking Enterprise folder/files...(Completed on " . (microtime(true) - $start) . " seconds)\n");
|
||||
|
||||
CLI::logging("* Start checking framework paths...\n");
|
||||
$start = microtime(true);
|
||||
$workspace->checkFrameworkPaths();
|
||||
|
||||
@@ -1068,10 +1068,6 @@ function check_workspace_disabled_code($args, $opts)
|
||||
foreach ($arrayWorkspace as $value) {
|
||||
$workspace = $value;
|
||||
|
||||
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";
|
||||
try {
|
||||
$arrayFoundDisabledCode = $workspace->getDisabledCode();
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
class DashletProcessMakerEnterprise implements DashletInterface
|
||||
{
|
||||
|
||||
const version = '1.0';
|
||||
|
||||
public static function getAdditionalFields($className)
|
||||
{
|
||||
$additionalFields = array();
|
||||
|
||||
return $additionalFields;
|
||||
}
|
||||
|
||||
public static function getXTemplate($className)
|
||||
{
|
||||
return "<iframe src=\"{page}?DAS_INS_UID={id}\" width=\"{width}\" height=\"207\" frameborder=\"0\"></iframe>";
|
||||
}
|
||||
|
||||
public function setup($config)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function render($width = 300)
|
||||
{
|
||||
$path = PATH_TPL . "/dashboard/dashletProcessMakerEnterprisePm3.html";
|
||||
$html = file_get_contents($path);
|
||||
echo $html;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,7 +18,7 @@ class DashletRssReader implements DashletInterface
|
||||
$urlFrom->width = 320;
|
||||
$urlFrom->maxLength = 200;
|
||||
$urlFrom->allowBlank = false;
|
||||
$urlFrom->value = "http://license.processmaker.com/syspmLicenseSrv/en/green/services/rssAP";
|
||||
$urlFrom->value = "http://www.runningcases.com";
|
||||
$additionalFields[] = $urlFrom;
|
||||
|
||||
return $additionalFields;
|
||||
@@ -31,7 +31,7 @@ class DashletRssReader implements DashletInterface
|
||||
|
||||
public function setup ($config)
|
||||
{
|
||||
$this->urlFrom = isset( $config['DAS_URL'] ) ? $config['DAS_URL'] : "http://license.processmaker.com/syspmLicenseSrv/en/green/services/rssAP";
|
||||
$this->urlFrom = isset( $config['DAS_URL'] ) ? $config['DAS_URL'] : "http://www.runningcases.com";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
<?php
|
||||
|
||||
class EnterpriseClass extends PMPlugin
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
set_include_path(PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEPARATOR . get_include_path());
|
||||
}
|
||||
|
||||
public function getFieldsForPageSetup()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
//update fields
|
||||
public function updateFieldsForPageSetup($oData)
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function setup()
|
||||
{
|
||||
}
|
||||
|
||||
public static function enterpriseSystemUpdate($data) //$data = $oData
|
||||
{
|
||||
if (count(glob(PATH_DATA_SITE . 'license/*.dat')) == 0) {
|
||||
return;
|
||||
}
|
||||
require_once("classes/model/Users.php");
|
||||
$user = $data;
|
||||
$criteria = new Criteria("workflow");
|
||||
|
||||
//SELECT
|
||||
$criteria->addSelectColumn(UsersPeer::USR_UID);
|
||||
//FROM
|
||||
//WHERE
|
||||
$criteria->add(UsersPeer::USR_USERNAME, $user->lName); //$user->lPassword
|
||||
$criteria->add(UsersPeer::USR_ROLE, "PROCESSMAKER_ADMIN");
|
||||
|
||||
//query
|
||||
$rsSQLUSR = UsersPeer::doSelectRS($criteria);
|
||||
$rsSQLUSR->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$sw = 0;
|
||||
|
||||
if (UsersPeer::doCount($criteria) > 0) {
|
||||
$sw = 1;
|
||||
}
|
||||
|
||||
if ($sw == 1) {
|
||||
//Upgrade available
|
||||
$swUpgrade = 0;
|
||||
|
||||
$addonList = AddonsStore::addonList();
|
||||
$addon = $addonList["addons"];
|
||||
|
||||
if (count($addon) > 0) {
|
||||
$status = array("ready", "upgrade", "available");
|
||||
$pmVersion = EnterpriseUtils::pmVersion(PM_VERSION);
|
||||
|
||||
foreach ($addon as $index => $value) {
|
||||
if ($addon[$index]["id"] == "processmaker") {
|
||||
if (version_compare($pmVersion . "",
|
||||
(EnterpriseUtils::pmVersion($addon[$index]["version"])) . "", "<")) {
|
||||
$swUpgrade = 1;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (in_array($addon[$index]["status"], $status)) {
|
||||
$swUpgrade = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($swUpgrade == 1) {
|
||||
$_SESSION["__ENTERPRISE_SYSTEM_UPDATE__"] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function enterpriseLimitCreateUser()
|
||||
{
|
||||
$oServerConf = ServerConf::getSingleton();
|
||||
$infoLicense = $oServerConf->getProperty('LICENSE_INFO');
|
||||
if (isset($infoLicense[config("system.workspace")]['LIMIT_USERS'])) {
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->add(UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
|
||||
$count = UsersPeer::doCount($criteria);
|
||||
if ($count >= $infoLicense[config("system.workspace")]['LIMIT_USERS']) {
|
||||
throw new Exception("You can\'t add more users to the System, this reach the limit of allowed users by license that it has installed now");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function setHashPassword($object)
|
||||
{
|
||||
$type = array('md5', 'sha256');
|
||||
if (!in_array($object->hash, $type)) {
|
||||
throw new Exception('Type: ' . $object->hash . ' No valid.');
|
||||
return false;
|
||||
}
|
||||
|
||||
$config = new Configurations();
|
||||
$typeEncrypt = $config->getConfiguration('ENTERPRISE_SETTING_ENCRYPT', '');
|
||||
if ($typeEncrypt == null) {
|
||||
$typeEncrypt = array('current' => $object->hash, 'previous' => 'md5');
|
||||
} else {
|
||||
$typeEncrypt['previous'] = $typeEncrypt['current'];
|
||||
$typeEncrypt['current'] = $object->hash;
|
||||
}
|
||||
if ($object->hash != $typeEncrypt['previous']) {
|
||||
$config->aConfig = $typeEncrypt;
|
||||
$config->saveConfig('ENTERPRISE_SETTING_ENCRYPT', '');
|
||||
}
|
||||
|
||||
$userProperty = new UsersProperties();
|
||||
|
||||
$criteria = new Criteria($object->workspace->dbInfo['DB_RBAC_NAME']);
|
||||
$criteria->add(RbacUsersPeer::USR_STATUS, 0, Criteria::NOT_EQUAL);
|
||||
$dataset = RbacUsersPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
while ($dataset->next()) {
|
||||
$row = $dataset->getRow();
|
||||
$property = $userProperty->loadOrCreateIfNotExists($row['USR_UID'], array());
|
||||
$property['USR_LOGGED_NEXT_TIME'] = 1;
|
||||
$userProperty->update($property);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Core\System;
|
||||
|
||||
class EnterpriseUtils
|
||||
{
|
||||
public static function getInternetConnection()
|
||||
{
|
||||
$data = array();
|
||||
|
||||
$criteria = new Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(ConfigurationPeer::CFG_VALUE);
|
||||
$criteria->add(ConfigurationPeer::CFG_UID, "EE");
|
||||
$criteria->add(ConfigurationPeer::OBJ_UID, "enterpriseConfiguration");
|
||||
$rsCriteria = ConfigurationPeer::doSelectRS($criteria);
|
||||
|
||||
if ($rsCriteria->next()) {
|
||||
$row = $rsCriteria->getRow();
|
||||
|
||||
$data = unserialize($row[0]);
|
||||
}
|
||||
|
||||
return ((isset($data["internetConnection"]))? intval($data["internetConnection"]) : 1);
|
||||
}
|
||||
|
||||
public static function checkConnectivity($url)
|
||||
{
|
||||
try {
|
||||
if (extension_loaded('curl')) {
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
|
||||
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
|
||||
curl_setopt($ch, CURLOPT_VERBOSE, true);
|
||||
|
||||
//Apply proxy settings
|
||||
$sysConf = System::getSystemConfiguration();
|
||||
if (isset($sysConf['proxy_host'])) {
|
||||
if ($sysConf['proxy_host'] != '') {
|
||||
curl_setopt($ch, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
|
||||
if ($sysConf['proxy_port'] != '') {
|
||||
curl_setopt($ch, CURLOPT_PROXYPORT, $sysConf['proxy_port']);
|
||||
}
|
||||
if ($sysConf['proxy_user'] != '') {
|
||||
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
|
||||
}
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
|
||||
}
|
||||
}
|
||||
|
||||
$content = curl_exec($ch);
|
||||
$headers = curl_getinfo($ch);
|
||||
$content = substr($content, $headers['header_size']);
|
||||
|
||||
if ($headers['http_code'] === 200) {
|
||||
return $content;
|
||||
}
|
||||
} else {
|
||||
throw (new Exception('The "CURL" extension not loaded.'));
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
//Log the error
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function checkFolderPermissions($folderPath, $result)
|
||||
{
|
||||
$directorio = opendir($folderPath);
|
||||
|
||||
if (is_writable ($folderPath)) {
|
||||
while (false !== ($archivo = readdir($directorio)) && $result == true) {
|
||||
if ($archivo != '.') {
|
||||
if ($archivo != '..') {
|
||||
if (is_dir("$folderPath/$archivo")) {
|
||||
$result = self::checkFolderPermissions($folderPath."/".$archivo, $result);
|
||||
} else {
|
||||
if (!is_writable ($folderPath."/".$archivo)) {
|
||||
$result = false;
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$result = false;
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
closedir($directorio);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function pmVersion($version)
|
||||
{
|
||||
if (preg_match("/^([\d\.]+).*$/", $version, $matches)) {
|
||||
$version = $matches[1];
|
||||
}
|
||||
|
||||
return $version;
|
||||
}
|
||||
|
||||
public static function getUrlServerName()
|
||||
{
|
||||
$s = (G::is_https() ? "s" : null);
|
||||
$p = strtolower($_SERVER["SERVER_PROTOCOL"]);
|
||||
|
||||
$protocol = substr($p, 0, strpos($p, "/")) . $s;
|
||||
$port = ($_SERVER["SERVER_PORT"] == "80")? null : ":" . $_SERVER["SERVER_PORT"];
|
||||
|
||||
return ($protocol . "://" . $_SERVER["SERVER_NAME"] . $port);
|
||||
}
|
||||
|
||||
public static function getUrl()
|
||||
{
|
||||
return (self::getUrlServerName() . $_SERVER["REQUEST_URI"]);
|
||||
}
|
||||
|
||||
public static function getUrlPartSetup()
|
||||
{
|
||||
$setup = "setup/main";
|
||||
|
||||
if (substr(SYS_SKIN, 0, 2) == "ux" && SYS_SKIN != "uxs") {
|
||||
$setup = "setup/main_init";
|
||||
}
|
||||
|
||||
return $setup;
|
||||
}
|
||||
|
||||
public static function skinIsUx()
|
||||
{
|
||||
$sw = 0;
|
||||
|
||||
if (substr(SYS_SKIN, 0, 2) == "ux" && SYS_SKIN != "uxs") {
|
||||
$sw = 1;
|
||||
}
|
||||
|
||||
return $sw;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -216,7 +216,6 @@ class PMPluginRegistry
|
||||
*/
|
||||
public function disablePlugin($sNamespace, $eventPlugin = 1)
|
||||
{
|
||||
//require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php';
|
||||
$sw = false;
|
||||
//G::pr($this->_aPluginDetails);die;
|
||||
foreach ($this->_aPluginDetails as $namespace => $detail) {
|
||||
@@ -898,7 +897,7 @@ class PMPluginRegistry
|
||||
$classFile = '';
|
||||
|
||||
foreach ($this->_aFolders as $row => $folder) {
|
||||
$fname = $folder->sNamespace == 'enterprise' ? PATH_CORE . 'classes' . PATH_SEP . 'class.' . $folder->sFolderName . '.php' : PATH_PLUGINS . $folder->sFolderName . PATH_SEP . 'class.' . $folder->sFolderName . '.php';
|
||||
$fname = PATH_PLUGINS . $folder->sFolderName . PATH_SEP . 'class.' . $folder->sFolderName . '.php';
|
||||
if ($detail->sNamespace == $folder->sNamespace && file_exists($fname)) {
|
||||
$found = true;
|
||||
$classFile = $fname;
|
||||
@@ -934,7 +933,7 @@ class PMPluginRegistry
|
||||
if ($triggerId == $detail->sTriggerId) {
|
||||
//review all folders registered for this namespace
|
||||
foreach ($this->_aFolders as $row => $folder) {
|
||||
$fname = $folder->sNamespace == 'enterprise' ? PATH_CORE . 'classes' . PATH_SEP . 'class.' . $folder->sFolderName . '.php' : PATH_PLUGINS . $folder->sFolderName . PATH_SEP . 'class.' . $folder->sFolderName . '.php';
|
||||
$fname = PATH_PLUGINS . $folder->sFolderName . PATH_SEP . 'class.' . $folder->sFolderName . '.php';
|
||||
if ($detail->sNamespace == $folder->sNamespace && file_exists($fname)) {
|
||||
$found = true;
|
||||
}
|
||||
@@ -1068,7 +1067,7 @@ class PMPluginRegistry
|
||||
if (isset($detail->enabled) && $detail->enabled) {
|
||||
if (!empty($detail->sFilename) && file_exists($detail->sFilename)) {
|
||||
$arrayFileInfo = pathinfo($detail->sFilename);
|
||||
$sFilename = (($detail->sNamespace == "enterprise") ? PATH_CORE . "methods" . PATH_SEP . "enterprise" . PATH_SEP : PATH_PLUGINS) . $arrayFileInfo["basename"];
|
||||
$sFilename = PATH_PLUGINS . $arrayFileInfo["basename"];
|
||||
if (!file_exists($sFilename)) {
|
||||
continue;
|
||||
}
|
||||
@@ -1082,7 +1081,6 @@ class PMPluginRegistry
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->eevalidate();
|
||||
return $iPlugins;
|
||||
} catch (Exception $e) {
|
||||
global $G_PUBLISH;
|
||||
@@ -1161,22 +1159,6 @@ class PMPluginRegistry
|
||||
return $this->executeMethod($sNamespace, 'updateFieldsForPageSetup', $oData);
|
||||
}
|
||||
|
||||
public function eevalidate()
|
||||
{
|
||||
$fileL = PATH_DATA_SITE . 'license.dat';
|
||||
$fileS = PATH_DATA . 'license.dat';
|
||||
if ((file_exists($fileL)) || (file_exists($fileS))) {
|
||||
//Found a License
|
||||
if (class_exists('pmLicenseManager')) {
|
||||
$sSerializedFile = PATH_DATA_SITE . 'lmn.singleton';
|
||||
$pmLicenseManagerO = PmLicenseManager::getSingleton();
|
||||
if (file_exists($sSerializedFile)) {
|
||||
$pmLicenseManagerO->unSerializeInstance(file_get_contents($sSerializedFile));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a toolbar for dynaform editor in the singleton
|
||||
*
|
||||
@@ -1740,26 +1722,6 @@ class PMPluginRegistry
|
||||
return $plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the plugin name is Enterprise Plugin
|
||||
*
|
||||
* @param string $pluginName Plugin name
|
||||
* @param string $path Path to plugin
|
||||
*
|
||||
* @return bool Returns TRUE when plugin name is Enterprise Plugin, FALSE otherwise
|
||||
*/
|
||||
public function isEnterprisePlugin($pluginName, $path = null)
|
||||
{
|
||||
$path = (!is_null($path) && $path != '') ? rtrim($path, '/\\') . PATH_SEP : PATH_PLUGINS;
|
||||
$pluginFile = $pluginName . '.php';
|
||||
|
||||
//Return
|
||||
return preg_match(
|
||||
'/^.*class\s+' . $pluginName . 'Plugin\s+extends\s+(?:enterprisePlugin)\s*\{.*$/i',
|
||||
str_replace(["\n", "\r", "\t"], ' ', file_get_contents($path . $pluginFile))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registry in an array routes for js or css files.
|
||||
* @param type $pluginName
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -60,8 +60,6 @@ class PmDynaform
|
||||
* @see workflow/engine/methods/cases/pmDynaform.php
|
||||
* @see workflow/engine/methods/cases/summary.php
|
||||
* @see workflow/engine/methods/services/ActionsByEmailDataForm.php
|
||||
* @see workflow/engine/plugins/EnterpriseSearch/display_dynaform.php
|
||||
* @see workflow/engine/plugins/EnterpriseSearch/dynaform_view1.php
|
||||
* @see \ProcessMaker\BusinessModel\ActionsByEmail->viewFormBpmn()
|
||||
* @see \ProcessMaker\BusinessModel\Cases->getCaseVariables()
|
||||
* @see \ProcessMaker\BusinessModel\Consolidated->getDataGenerate()
|
||||
|
||||
@@ -26,12 +26,6 @@ class PmGoogleApi
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if (!($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09') || $licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M='))) {
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die;
|
||||
}
|
||||
$this->loadSettings();
|
||||
}
|
||||
|
||||
@@ -91,10 +85,6 @@ class PmGoogleApi
|
||||
|
||||
public function setServiceGmailStatus($status)
|
||||
{
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if (!$licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
|
||||
$status = false;
|
||||
}
|
||||
$this->setConfigGmail('serviceGmailStatus', $status);
|
||||
$this->serviceGmailStatus = $status;
|
||||
}
|
||||
@@ -106,10 +96,6 @@ class PmGoogleApi
|
||||
|
||||
public function setServiceDriveStatus($status)
|
||||
{
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if (!$licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) {
|
||||
$status = false;
|
||||
}
|
||||
$this->setConfigGmail('serviceDriveStatus', $status);
|
||||
$this->serviceDriveStatus = $status;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user