From d3bd0fcfbca5c95b77d41c95c47a6199b8233735 Mon Sep 17 00:00:00 2001 From: Fernando Ontiveros Date: Wed, 2 Apr 2025 00:00:00 +0000 Subject: [PATCH] Removing deprecated references and files --- bootstrap/classaliasmap.php | 5 - database/factories/LicenseManagerFactory.php | 32 - features/bootstrap/FeatureContext.php | 1 - framework/src/Maveriks/Util/Common.php | 2 +- gulliver/bin/tasks/pakeGulliver.php | 9 +- gulliver/system/class.g.php | 3 - tests/TestCase.php | 1 - tests/WorkflowTestCase.php | 17 - tests/resources/simpleClassicSessionData.json | 2 - .../classes/PmFunctions/ExecuteQueryTest.php | 2 +- .../authSources/AuthSourcesEditTest.php | 2 +- .../authSources/AuthSourcesNewTest.php | 2 +- .../services/ActionsByEmailDataFormTest.php | 5 - .../ProcessMaker/Importer/XmlImporterTest.php | 4 - .../Services/OAuth2/ServerTest.php | 329 ---- workflow/engine/bin/cron_single.php | 14 +- workflow/engine/bin/tasks/cliAddons.php | 91 - workflow/engine/bin/tasks/cliUpgrade.php | 5 - workflow/engine/bin/tasks/cliWorkspaces.php | 4 - .../classes/DashletProcessMakerEnterprise.php | 34 - workflow/engine/classes/DashletRssReader.php | 4 +- workflow/engine/classes/EnterpriseClass.php | 133 -- workflow/engine/classes/EnterpriseUtils.php | 152 -- .../engine/classes/License_Application.php | 500 ------ .../engine/classes/PMLicensedFeatures.php | 495 ------ workflow/engine/classes/PMPluginRegistry.php | 44 +- workflow/engine/classes/Padl.php | 706 -------- workflow/engine/classes/PmDynaform.php | 2 - workflow/engine/classes/PmGoogleApi.php | 14 - workflow/engine/classes/PmLicenseManager.php | 532 ------ workflow/engine/classes/WorkspaceTools.php | 110 -- workflow/engine/classes/WsBase.php | 6 +- workflow/engine/classes/class.license.app.php | 7 - workflow/engine/classes/class.license.lib.php | 7 - .../engine/classes/class.licensedFeatures.php | 7 - workflow/engine/classes/class.plugin.php | 13 +- .../engine/classes/class.pmLicenseManager.php | 7 - .../engine/classes/model/AddonsManager.php | 489 ------ .../classes/model/AddonsManagerPeer.php | 24 - workflow/engine/classes/model/AddonsStore.php | 637 ------- .../engine/classes/model/AddonsStorePeer.php | 24 - .../engine/classes/model/LicenseManager.php | 20 - .../classes/model/LicenseManagerPeer.php | 24 - .../model/map/AddonStoreMapBuilder.php | 70 - .../model/map/AddonsManagerMapBuilder.php | 106 -- .../model/map/AddonsStoreMapBuilder.php | 80 - .../model/map/LicenseManagerMapBuilder.php | 90 - .../classes/model/om/BaseAddonsManager.php | 1558 ----------------- .../model/om/BaseAddonsManagerPeer.php | 642 ------- .../classes/model/om/BaseAddonsStore.php | 770 -------- .../classes/model/om/BaseAddonsStorePeer.php | 587 ------- .../classes/model/om/BaseLicenseManager.php | 1032 ----------- .../model/om/BaseLicenseManagerPeer.php | 612 ------- workflow/engine/config/schema.xml | 45 - .../translations/english/processmaker.en.po | 198 --- .../engine/controllers/InstallerModule.php | 59 - workflow/engine/controllers/adminProxy.php | 48 +- workflow/engine/controllers/home.php | 1 - workflow/engine/controllers/main.php | 10 - workflow/engine/controllers/pmGmail.php | 12 +- .../engine/controllers/strategicDashboard.php | 6 - workflow/engine/data/mysql/insert.sql | 47 - workflow/engine/data/mysql/schema.sql | 67 - workflow/engine/menus/setup.php | 22 - .../engine/methods/cases/ajaxListener.php | 1 - .../engine/methods/cases/casesListExtJs.php | 7 - .../engine/methods/cases/casesMenuLoader.php | 13 +- .../methods/cases/cases_ShowDocument.php | 1 - .../cases/cases_ShowOutputDocument.php | 1 - .../engine/methods/cases/derivatedGmail.php | 7 +- workflow/engine/methods/cases/main_init.php | 2 +- workflow/engine/methods/cases/open.php | 3 - .../engine/methods/enterprise/addonsStore.php | 94 - .../methods/enterprise/addonsStoreAction.php | 347 ---- .../engine/methods/enterprise/enterprise.php | 371 ---- .../methods/enterprise/enterpriseAjax.php | 70 - .../methods/enterprise/pluginsImportFile.php | 144 -- .../methods/enterprise/pluginsSetup.php | 36 - .../methods/enterprise/processMakerAjax.php | 380 ---- .../engine/methods/login/authentication.php | 9 - .../engine/methods/login/licenseUpdate.php | 60 - .../engine/methods/login/updateTimezone.php | 2 - .../methods/services/ActionsByEmail.php | 2 - .../services/ActionsByEmailDataForm.php | 2 - .../services/ActionsByEmailDataFormPost.php | 7 +- workflow/engine/methods/setup/mainAjax.php | 7 - .../engine/methods/setup/pluginsChange.php | 22 - .../methods/setup/pluginsImportFile.php | 153 -- .../methods/strategicDashboard/main.php | 7 - workflow/engine/skinEngine/base/updating.php | 1 - .../neoclassic/css/pmos-xtheme-gray.css | 27 - .../engine/skinEngine/neoclassic/updating.php | 1 - workflow/engine/skinEngine/skinEngine.php | 30 - .../uxmodern/css/pmos-xtheme-gray.css | 21 - .../skinEngine/uxmodern/layout-pm-modern.html | 5 - .../BusinessModel/ActionsByEmail.php | 12 +- .../ActionsByEmail/ResponseReader.php | 5 - .../src/ProcessMaker/BusinessModel/Light.php | 1 - .../src/ProcessMaker/BusinessModel/Lists.php | 8 +- .../Migrator/GranularExporter.php | 8 - .../Migrator/GranularImporter.php | 8 - .../ProcessMaker/BusinessModel/Pmgmail.php | 9 +- .../ProcessMaker/BusinessModel/Trigger.php | 1 - .../src/ProcessMaker/Cases/CasesTrait.php | 1 - .../src/ProcessMaker/Core/Installer.php | 1 - .../src/ProcessMaker/Model/LicenseManager.php | 17 - .../ProcessMaker/Plugins/PluginRegistry.php | 36 +- .../src/ProcessMaker/Services/Api/System.php | 1 - .../Services/Google/Authentication.php | 2 +- .../engine/src/ProcessMaker/Services/api.ini | 2 +- .../engine/templates/cases/casesListSetup.js | 2 - .../templates/enterprise/addonsStore.js | 1551 ---------------- .../engine/xmlform/login/licenseExpired.xml | 12 - .../xmlform/login/licenseExpiredpm3.html | 35 - .../xmlform/login/licenseExpiredpm3.xml | 32 - workflow/public_html/pmGmail/sso.php | 6 +- workflow/public_html/sysGeneric.php | 1 - 117 files changed, 40 insertions(+), 14127 deletions(-) delete mode 100644 database/factories/LicenseManagerFactory.php delete mode 100644 workflow/engine/bin/tasks/cliAddons.php delete mode 100644 workflow/engine/classes/DashletProcessMakerEnterprise.php delete mode 100644 workflow/engine/classes/EnterpriseClass.php delete mode 100644 workflow/engine/classes/EnterpriseUtils.php delete mode 100644 workflow/engine/classes/License_Application.php delete mode 100644 workflow/engine/classes/PMLicensedFeatures.php delete mode 100644 workflow/engine/classes/Padl.php delete mode 100644 workflow/engine/classes/PmLicenseManager.php delete mode 100644 workflow/engine/classes/class.license.app.php delete mode 100644 workflow/engine/classes/class.license.lib.php delete mode 100644 workflow/engine/classes/class.licensedFeatures.php delete mode 100644 workflow/engine/classes/class.pmLicenseManager.php delete mode 100644 workflow/engine/classes/model/AddonsManager.php delete mode 100644 workflow/engine/classes/model/AddonsManagerPeer.php delete mode 100644 workflow/engine/classes/model/AddonsStore.php delete mode 100644 workflow/engine/classes/model/AddonsStorePeer.php delete mode 100644 workflow/engine/classes/model/LicenseManager.php delete mode 100644 workflow/engine/classes/model/LicenseManagerPeer.php delete mode 100644 workflow/engine/classes/model/map/AddonStoreMapBuilder.php delete mode 100644 workflow/engine/classes/model/map/AddonsManagerMapBuilder.php delete mode 100644 workflow/engine/classes/model/map/AddonsStoreMapBuilder.php delete mode 100644 workflow/engine/classes/model/map/LicenseManagerMapBuilder.php delete mode 100644 workflow/engine/classes/model/om/BaseAddonsManager.php delete mode 100644 workflow/engine/classes/model/om/BaseAddonsManagerPeer.php delete mode 100644 workflow/engine/classes/model/om/BaseAddonsStore.php delete mode 100644 workflow/engine/classes/model/om/BaseAddonsStorePeer.php delete mode 100644 workflow/engine/classes/model/om/BaseLicenseManager.php delete mode 100644 workflow/engine/classes/model/om/BaseLicenseManagerPeer.php delete mode 100644 workflow/engine/methods/enterprise/addonsStore.php delete mode 100644 workflow/engine/methods/enterprise/addonsStoreAction.php delete mode 100644 workflow/engine/methods/enterprise/enterprise.php delete mode 100644 workflow/engine/methods/enterprise/enterpriseAjax.php delete mode 100644 workflow/engine/methods/enterprise/pluginsImportFile.php delete mode 100644 workflow/engine/methods/enterprise/pluginsSetup.php delete mode 100644 workflow/engine/methods/enterprise/processMakerAjax.php delete mode 100644 workflow/engine/methods/login/licenseUpdate.php delete mode 100644 workflow/engine/src/ProcessMaker/Model/LicenseManager.php delete mode 100644 workflow/engine/templates/enterprise/addonsStore.js delete mode 100644 workflow/engine/xmlform/login/licenseExpired.xml delete mode 100644 workflow/engine/xmlform/login/licenseExpiredpm3.html delete mode 100644 workflow/engine/xmlform/login/licenseExpiredpm3.xml diff --git a/bootstrap/classaliasmap.php b/bootstrap/classaliasmap.php index 734997540..4fba1a533 100644 --- a/bootstrap/classaliasmap.php +++ b/bootstrap/classaliasmap.php @@ -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, diff --git a/database/factories/LicenseManagerFactory.php b/database/factories/LicenseManagerFactory.php deleted file mode 100644 index 009b2748d..000000000 --- a/database/factories/LicenseManagerFactory.php +++ /dev/null @@ -1,32 +0,0 @@ - $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' - ]; - } - -} diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php index 4b1a93aec..58ac13afe 100644 --- a/features/bootstrap/FeatureContext.php +++ b/features/bootstrap/FeatureContext.php @@ -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})'); diff --git a/framework/src/Maveriks/Util/Common.php b/framework/src/Maveriks/Util/Common.php index f14ed1486..bcf39a355 100644 --- a/framework/src/Maveriks/Util/Common.php +++ b/framework/src/Maveriks/Util/Common.php @@ -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) diff --git a/gulliver/bin/tasks/pakeGulliver.php b/gulliver/bin/tasks/pakeGulliver.php index b14466e4d..976dea9ef 100644 --- a/gulliver/bin/tasks/pakeGulliver.php +++ b/gulliver/bin/tasks/pakeGulliver.php @@ -44,7 +44,7 @@ pake_task('new-plugin', 'project_exists'); pake_desc("Update the plugin attributes in all workspaces\n args: "); pake_task("update-plugin-attributes", "project_exists"); -pake_desc("Check disabled code in plugins\n args: [enterprise-plugin|custom-plugin|all|]"); +pake_desc("Check disabled code in plugins\n args: [custom-plugin|all|]"); pake_task("check-plugin-disabled-code", "project_exists"); pake_desc("pack plugin in .tar file \n args: "); @@ -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 "": diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index b51f9a976..c6a88ba1d 100644 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -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: diff --git a/tests/TestCase.php b/tests/TestCase.php index af7ff423d..d2a581c19 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -104,7 +104,6 @@ abstract class TestCase extends BaseTestCase 'DASHLET_INSTANCE', 'CONFIGURATION', 'CATALOG', - 'ADDONS_MANAGER', 'APP_SEQUENCE', 'OAUTH_CLIENTS', 'OAUTH_ACCESS_TOKENS' diff --git a/tests/WorkflowTestCase.php b/tests/WorkflowTestCase.php index a2b90118d..c801259c5 100644 --- a/tests/WorkflowTestCase.php +++ b/tests/WorkflowTestCase.php @@ -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. * diff --git a/tests/resources/simpleClassicSessionData.json b/tests/resources/simpleClassicSessionData.json index 288d50114..cd5e3a11a 100644 --- a/tests/resources/simpleClassicSessionData.json +++ b/tests/resources/simpleClassicSessionData.json @@ -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", diff --git a/tests/unit/workflow/engine/classes/PmFunctions/ExecuteQueryTest.php b/tests/unit/workflow/engine/classes/PmFunctions/ExecuteQueryTest.php index 8d0331798..139dbb36a 100644 --- a/tests/unit/workflow/engine/classes/PmFunctions/ExecuteQueryTest.php +++ b/tests/unit/workflow/engine/classes/PmFunctions/ExecuteQueryTest.php @@ -18,7 +18,7 @@ use Tests\TestCase; class ExecuteQueryTest extends TestCase { protected $nameSystemTables = "system-tables.ini"; - protected $contentSystemTables = "tables = 'APPLICATION|APP_SEQUENCE|APP_DELEGATION|APP_DOCUMENT|APP_MESSAGE|APP_OWNER|CONFIGURATION|CONTENT|DEPARTMENT|DYNAFORM|GROUPWF|GROUP_USER|HOLIDAY|INPUT_DOCUMENT|ISO_COUNTRY|ISO_LOCATION|ISO_SUBDIVISION|LANGUAGE|LEXICO|OUTPUT_DOCUMENT|PROCESS|PROCESS_OWNER|REPORT_TABLE|REPORT_VAR|ROUTE|STEP|STEP_TRIGGER|SWIMLANES_ELEMENTS|TASK|TASK_USER|TRANSLATION|TRIGGERS|USERS|APP_THREAD|APP_DELAY|PROCESS_USER|SESSION|DB_SOURCE|STEP_SUPERVISOR|OBJECT_PERMISSION|CASE_TRACKER|CASE_TRACKER_OBJECT|CASE_CONSOLIDATED|STAGE|SUB_PROCESS|SUB_APPLICATION|LOGIN_LOG|USERS_PROPERTIES|ADDITIONAL_TABLES|FIELDS|SHADOW_TABLE|EVENT|GATEWAY|APP_EVENT|APP_CACHE_VIEW|DIM_TIME_DELEGATE|DIM_TIME_COMPLETE|APP_HISTORY|APP_FOLDER|FIELD_CONDITION|LOG_CASES_SCHEDULER|CASE_SCHEDULER|CALENDAR_DEFINITION|CALENDAR_BUSINESS_HOURS|CALENDAR_HOLIDAYS|CALENDAR_ASSIGNMENTS|PROCESS_CATEGORY|APP_NOTES|DASHLET|DASHLET_INSTANCE|APP_SOLR_QUEUE|SEQUENCES|SESSION_STORAGE|PROCESS_FILES|WEB_ENTRY|OAUTH_ACCESS_TOKENS|OAUTH_AUTHORIZATION_CODES|OAUTH_CLIENTS|OAUTH_REFRESH_TOKENS|OAUTH_SCOPES|PMOAUTH_USER_ACCESS_TOKENS|BPMN_PROJECT|BPMN_PROCESS|BPMN_ACTIVITY|BPMN_ARTIFACT|BPMN_DIAGRAM|BPMN_BOUND|BPMN_DATA|BPMN_EVENT|BPMN_FLOW|BPMN_GATEWAY|BPMN_LANESET|BPMN_LANE|BPMN_PARTICIPANT|BPMN_EXTENSION|BPMN_DOCUMENTATION|PROCESS_VARIABLES|APP_TIMEOUT_ACTION_EXECUTED|ADDONS_STORE|ADDONS_MANAGER|LICENSE_MANAGER|APP_ASSIGN_SELF_SERVICE_VALUE|APP_ASSIGN_SELF_SERVICE_VALUE_GROUP|LIST_INBOX|LIST_PARTICIPATED_HISTORY|LIST_PARTICIPATED_LAST|LIST_COMPLETED|LIST_PAUSED|LIST_CANCELED|LIST_MY_INBOX|LIST_UNASSIGNED|LIST_UNASSIGNED_GROUP|MESSAGE_TYPE|MESSAGE_TYPE_VARIABLE|EMAIL_SERVER|WEB_ENTRY_EVENT|MESSAGE_EVENT_DEFINITION|MESSAGE_EVENT_RELATION|MESSAGE_APPLICATION|ELEMENT_TASK_RELATION|ABE_CONFIGURATION|ABE_REQUESTS|ABE_RESPONSES|USR_REPORTING|PRO_REPORTING|DASHBOARD|DASHBOARD_INDICATOR|DASHBOARD_DAS_IND|CATALOG|SCRIPT_TASK|TIMER_EVENT|EMAIL_EVENT|NOTIFICATION_DEVICE|GMAIL_RELABELING|NOTIFICATION_QUEUE|PLUGINS_REGISTRY|APP_DATA_CHANGE_LOG|JOBS_PENDING|JOBS_FAILED|RBAC_PERMISSIONS|RBAC_ROLES|RBAC_ROLES_PERMISSIONS|RBAC_SYSTEMS|RBAC_USERS|RBAC_USERS_ROLES|RBAC_AUTHENTICATION_SOURCE|'"; + protected $contentSystemTables = "tables = 'APPLICATION|APP_SEQUENCE|APP_DELEGATION|APP_DOCUMENT|APP_MESSAGE|APP_OWNER|CONFIGURATION|CONTENT|DEPARTMENT|DYNAFORM|GROUPWF|GROUP_USER|HOLIDAY|INPUT_DOCUMENT|ISO_COUNTRY|ISO_LOCATION|ISO_SUBDIVISION|LANGUAGE|LEXICO|OUTPUT_DOCUMENT|PROCESS|PROCESS_OWNER|REPORT_TABLE|REPORT_VAR|ROUTE|STEP|STEP_TRIGGER|SWIMLANES_ELEMENTS|TASK|TASK_USER|TRANSLATION|TRIGGERS|USERS|APP_THREAD|APP_DELAY|PROCESS_USER|SESSION|DB_SOURCE|STEP_SUPERVISOR|OBJECT_PERMISSION|CASE_TRACKER|CASE_TRACKER_OBJECT|CASE_CONSOLIDATED|STAGE|SUB_PROCESS|SUB_APPLICATION|LOGIN_LOG|USERS_PROPERTIES|ADDITIONAL_TABLES|FIELDS|SHADOW_TABLE|EVENT|GATEWAY|APP_EVENT|APP_CACHE_VIEW|DIM_TIME_DELEGATE|DIM_TIME_COMPLETE|APP_HISTORY|APP_FOLDER|FIELD_CONDITION|LOG_CASES_SCHEDULER|CASE_SCHEDULER|CALENDAR_DEFINITION|CALENDAR_BUSINESS_HOURS|CALENDAR_HOLIDAYS|CALENDAR_ASSIGNMENTS|PROCESS_CATEGORY|APP_NOTES|DASHLET|DASHLET_INSTANCE|APP_SOLR_QUEUE|SEQUENCES|SESSION_STORAGE|PROCESS_FILES|WEB_ENTRY|OAUTH_ACCESS_TOKENS|OAUTH_AUTHORIZATION_CODES|OAUTH_CLIENTS|OAUTH_REFRESH_TOKENS|OAUTH_SCOPES|PMOAUTH_USER_ACCESS_TOKENS|BPMN_PROJECT|BPMN_PROCESS|BPMN_ACTIVITY|BPMN_ARTIFACT|BPMN_DIAGRAM|BPMN_BOUND|BPMN_DATA|BPMN_EVENT|BPMN_FLOW|BPMN_GATEWAY|BPMN_LANESET|BPMN_LANE|BPMN_PARTICIPANT|BPMN_EXTENSION|BPMN_DOCUMENTATION|PROCESS_VARIABLES|APP_TIMEOUT_ACTION_EXECUTED|APP_ASSIGN_SELF_SERVICE_VALUE|APP_ASSIGN_SELF_SERVICE_VALUE_GROUP|LIST_INBOX|LIST_PARTICIPATED_HISTORY|LIST_PARTICIPATED_LAST|LIST_COMPLETED|LIST_PAUSED|LIST_CANCELED|LIST_MY_INBOX|LIST_UNASSIGNED|LIST_UNASSIGNED_GROUP|MESSAGE_TYPE|MESSAGE_TYPE_VARIABLE|EMAIL_SERVER|WEB_ENTRY_EVENT|MESSAGE_EVENT_DEFINITION|MESSAGE_EVENT_RELATION|MESSAGE_APPLICATION|ELEMENT_TASK_RELATION|ABE_CONFIGURATION|ABE_REQUESTS|ABE_RESPONSES|USR_REPORTING|PRO_REPORTING|DASHBOARD|DASHBOARD_INDICATOR|DASHBOARD_DAS_IND|CATALOG|SCRIPT_TASK|TIMER_EVENT|EMAIL_EVENT|NOTIFICATION_DEVICE|GMAIL_RELABELING|NOTIFICATION_QUEUE|PLUGINS_REGISTRY|APP_DATA_CHANGE_LOG|JOBS_PENDING|JOBS_FAILED|RBAC_PERMISSIONS|RBAC_ROLES|RBAC_ROLES_PERMISSIONS|RBAC_SYSTEMS|RBAC_USERS|RBAC_USERS_ROLES|RBAC_AUTHENTICATION_SOURCE|'"; protected $oldContentSystemTables = ""; /** diff --git a/tests/unit/workflow/engine/methods/authSources/AuthSourcesEditTest.php b/tests/unit/workflow/engine/methods/authSources/AuthSourcesEditTest.php index c8db87f7b..b3168224d 100644 --- a/tests/unit/workflow/engine/methods/authSources/AuthSourcesEditTest.php +++ b/tests/unit/workflow/engine/methods/authSources/AuthSourcesEditTest.php @@ -48,7 +48,7 @@ class AuthSourcesEditTest extends TestCase */ public function it_should_test_edit_configuration_page() { - $string = "tables = 'APPLICATION|APP_SEQUENCE|APP_DELEGATION|APP_DOCUMENT|APP_MESSAGE|APP_OWNER|CONFIGURATION|CONTENT|DEPARTMENT|DYNAFORM|GROUPWF|GROUP_USER|HOLIDAY|INPUT_DOCUMENT|ISO_COUNTRY|ISO_LOCATION|ISO_SUBDIVISION|LANGUAGE|LEXICO|OUTPUT_DOCUMENT|PROCESS|PROCESS_OWNER|REPORT_TABLE|REPORT_VAR|ROUTE|STEP|STEP_TRIGGER|SWIMLANES_ELEMENTS|TASK|TASK_USER|TRANSLATION|TRIGGERS|USERS|APP_THREAD|APP_DELAY|PROCESS_USER|SESSION|DB_SOURCE|STEP_SUPERVISOR|OBJECT_PERMISSION|CASE_TRACKER|CASE_TRACKER_OBJECT|CASE_CONSOLIDATED|STAGE|SUB_PROCESS|SUB_APPLICATION|LOGIN_LOG|USERS_PROPERTIES|ADDITIONAL_TABLES|FIELDS|SHADOW_TABLE|EVENT|GATEWAY|APP_EVENT|APP_CACHE_VIEW|DIM_TIME_DELEGATE|DIM_TIME_COMPLETE|APP_HISTORY|APP_FOLDER|FIELD_CONDITION|LOG_CASES_SCHEDULER|CASE_SCHEDULER|CALENDAR_DEFINITION|CALENDAR_BUSINESS_HOURS|CALENDAR_HOLIDAYS|CALENDAR_ASSIGNMENTS|PROCESS_CATEGORY|APP_NOTES|DASHLET|DASHLET_INSTANCE|APP_SOLR_QUEUE|SEQUENCES|SESSION_STORAGE|PROCESS_FILES|WEB_ENTRY|OAUTH_ACCESS_TOKENS|OAUTH_AUTHORIZATION_CODES|OAUTH_CLIENTS|OAUTH_REFRESH_TOKENS|OAUTH_SCOPES|PMOAUTH_USER_ACCESS_TOKENS|BPMN_PROJECT|BPMN_PROCESS|BPMN_ACTIVITY|BPMN_ARTIFACT|BPMN_DIAGRAM|BPMN_BOUND|BPMN_DATA|BPMN_EVENT|BPMN_FLOW|BPMN_GATEWAY|BPMN_LANESET|BPMN_LANE|BPMN_PARTICIPANT|BPMN_EXTENSION|BPMN_DOCUMENTATION|PROCESS_VARIABLES|APP_TIMEOUT_ACTION_EXECUTED|ADDONS_STORE|ADDONS_MANAGER|LICENSE_MANAGER|APP_ASSIGN_SELF_SERVICE_VALUE|APP_ASSIGN_SELF_SERVICE_VALUE_GROUP|LIST_INBOX|LIST_PARTICIPATED_HISTORY|LIST_PARTICIPATED_LAST|LIST_COMPLETED|LIST_PAUSED|LIST_CANCELED|LIST_MY_INBOX|LIST_UNASSIGNED|LIST_UNASSIGNED_GROUP|MESSAGE_TYPE|MESSAGE_TYPE_VARIABLE|EMAIL_SERVER|WEB_ENTRY_EVENT|MESSAGE_EVENT_DEFINITION|MESSAGE_EVENT_RELATION|MESSAGE_APPLICATION|ELEMENT_TASK_RELATION|ABE_CONFIGURATION|ABE_REQUESTS|ABE_RESPONSES|USR_REPORTING|PRO_REPORTING|DASHBOARD|DASHBOARD_INDICATOR|DASHBOARD_DAS_IND|CATALOG|SCRIPT_TASK|TIMER_EVENT|EMAIL_EVENT|NOTIFICATION_DEVICE|GMAIL_RELABELING|NOTIFICATION_QUEUE|PLUGINS_REGISTRY|APP_DATA_CHANGE_LOG|JOBS_PENDING|JOBS_FAILED|RBAC_PERMISSIONS|RBAC_ROLES|RBAC_ROLES_PERMISSIONS|RBAC_SYSTEMS|RBAC_USERS|RBAC_USERS_ROLES|RBAC_AUTHENTICATION_SOURCE|' "; + $string = "tables = 'APPLICATION|APP_SEQUENCE|APP_DELEGATION|APP_DOCUMENT|APP_MESSAGE|APP_OWNER|CONFIGURATION|CONTENT|DEPARTMENT|DYNAFORM|GROUPWF|GROUP_USER|HOLIDAY|INPUT_DOCUMENT|ISO_COUNTRY|ISO_LOCATION|ISO_SUBDIVISION|LANGUAGE|LEXICO|OUTPUT_DOCUMENT|PROCESS|PROCESS_OWNER|REPORT_TABLE|REPORT_VAR|ROUTE|STEP|STEP_TRIGGER|SWIMLANES_ELEMENTS|TASK|TASK_USER|TRANSLATION|TRIGGERS|USERS|APP_THREAD|APP_DELAY|PROCESS_USER|SESSION|DB_SOURCE|STEP_SUPERVISOR|OBJECT_PERMISSION|CASE_TRACKER|CASE_TRACKER_OBJECT|CASE_CONSOLIDATED|STAGE|SUB_PROCESS|SUB_APPLICATION|LOGIN_LOG|USERS_PROPERTIES|ADDITIONAL_TABLES|FIELDS|SHADOW_TABLE|EVENT|GATEWAY|APP_EVENT|APP_CACHE_VIEW|DIM_TIME_DELEGATE|DIM_TIME_COMPLETE|APP_HISTORY|APP_FOLDER|FIELD_CONDITION|LOG_CASES_SCHEDULER|CASE_SCHEDULER|CALENDAR_DEFINITION|CALENDAR_BUSINESS_HOURS|CALENDAR_HOLIDAYS|CALENDAR_ASSIGNMENTS|PROCESS_CATEGORY|APP_NOTES|DASHLET|DASHLET_INSTANCE|APP_SOLR_QUEUE|SEQUENCES|SESSION_STORAGE|PROCESS_FILES|WEB_ENTRY|OAUTH_ACCESS_TOKENS|OAUTH_AUTHORIZATION_CODES|OAUTH_CLIENTS|OAUTH_REFRESH_TOKENS|OAUTH_SCOPES|PMOAUTH_USER_ACCESS_TOKENS|BPMN_PROJECT|BPMN_PROCESS|BPMN_ACTIVITY|BPMN_ARTIFACT|BPMN_DIAGRAM|BPMN_BOUND|BPMN_DATA|BPMN_EVENT|BPMN_FLOW|BPMN_GATEWAY|BPMN_LANESET|BPMN_LANE|BPMN_PARTICIPANT|BPMN_EXTENSION|BPMN_DOCUMENTATION|PROCESS_VARIABLES|APP_TIMEOUT_ACTION_EXECUTED|APP_ASSIGN_SELF_SERVICE_VALUE|APP_ASSIGN_SELF_SERVICE_VALUE_GROUP|LIST_INBOX|LIST_PARTICIPATED_HISTORY|LIST_PARTICIPATED_LAST|LIST_COMPLETED|LIST_PAUSED|LIST_CANCELED|LIST_MY_INBOX|LIST_UNASSIGNED|LIST_UNASSIGNED_GROUP|MESSAGE_TYPE|MESSAGE_TYPE_VARIABLE|EMAIL_SERVER|WEB_ENTRY_EVENT|MESSAGE_EVENT_DEFINITION|MESSAGE_EVENT_RELATION|MESSAGE_APPLICATION|ELEMENT_TASK_RELATION|ABE_CONFIGURATION|ABE_REQUESTS|ABE_RESPONSES|USR_REPORTING|PRO_REPORTING|DASHBOARD|DASHBOARD_INDICATOR|DASHBOARD_DAS_IND|CATALOG|SCRIPT_TASK|TIMER_EVENT|EMAIL_EVENT|NOTIFICATION_DEVICE|GMAIL_RELABELING|NOTIFICATION_QUEUE|PLUGINS_REGISTRY|APP_DATA_CHANGE_LOG|JOBS_PENDING|JOBS_FAILED|RBAC_PERMISSIONS|RBAC_ROLES|RBAC_ROLES_PERMISSIONS|RBAC_SYSTEMS|RBAC_USERS|RBAC_USERS_ROLES|RBAC_AUTHENTICATION_SOURCE|' "; $systemTablesPath = PATH_CONFIG . 'system-tables.ini'; if (!file_exists($systemTablesPath)) { file_put_contents($systemTablesPath, $string); diff --git a/tests/unit/workflow/engine/methods/authSources/AuthSourcesNewTest.php b/tests/unit/workflow/engine/methods/authSources/AuthSourcesNewTest.php index 116092780..94cf5acc2 100644 --- a/tests/unit/workflow/engine/methods/authSources/AuthSourcesNewTest.php +++ b/tests/unit/workflow/engine/methods/authSources/AuthSourcesNewTest.php @@ -44,7 +44,7 @@ class AuthSourcesNewTest extends TestCase */ public function it_should_test_new_configuration_page() { - $string = "tables = 'APPLICATION|APP_SEQUENCE|APP_DELEGATION|APP_DOCUMENT|APP_MESSAGE|APP_OWNER|CONFIGURATION|CONTENT|DEPARTMENT|DYNAFORM|GROUPWF|GROUP_USER|HOLIDAY|INPUT_DOCUMENT|ISO_COUNTRY|ISO_LOCATION|ISO_SUBDIVISION|LANGUAGE|LEXICO|OUTPUT_DOCUMENT|PROCESS|PROCESS_OWNER|REPORT_TABLE|REPORT_VAR|ROUTE|STEP|STEP_TRIGGER|SWIMLANES_ELEMENTS|TASK|TASK_USER|TRANSLATION|TRIGGERS|USERS|APP_THREAD|APP_DELAY|PROCESS_USER|SESSION|DB_SOURCE|STEP_SUPERVISOR|OBJECT_PERMISSION|CASE_TRACKER|CASE_TRACKER_OBJECT|CASE_CONSOLIDATED|STAGE|SUB_PROCESS|SUB_APPLICATION|LOGIN_LOG|USERS_PROPERTIES|ADDITIONAL_TABLES|FIELDS|SHADOW_TABLE|EVENT|GATEWAY|APP_EVENT|APP_CACHE_VIEW|DIM_TIME_DELEGATE|DIM_TIME_COMPLETE|APP_HISTORY|APP_FOLDER|FIELD_CONDITION|LOG_CASES_SCHEDULER|CASE_SCHEDULER|CALENDAR_DEFINITION|CALENDAR_BUSINESS_HOURS|CALENDAR_HOLIDAYS|CALENDAR_ASSIGNMENTS|PROCESS_CATEGORY|APP_NOTES|DASHLET|DASHLET_INSTANCE|APP_SOLR_QUEUE|SEQUENCES|SESSION_STORAGE|PROCESS_FILES|WEB_ENTRY|OAUTH_ACCESS_TOKENS|OAUTH_AUTHORIZATION_CODES|OAUTH_CLIENTS|OAUTH_REFRESH_TOKENS|OAUTH_SCOPES|PMOAUTH_USER_ACCESS_TOKENS|BPMN_PROJECT|BPMN_PROCESS|BPMN_ACTIVITY|BPMN_ARTIFACT|BPMN_DIAGRAM|BPMN_BOUND|BPMN_DATA|BPMN_EVENT|BPMN_FLOW|BPMN_GATEWAY|BPMN_LANESET|BPMN_LANE|BPMN_PARTICIPANT|BPMN_EXTENSION|BPMN_DOCUMENTATION|PROCESS_VARIABLES|APP_TIMEOUT_ACTION_EXECUTED|ADDONS_STORE|ADDONS_MANAGER|LICENSE_MANAGER|APP_ASSIGN_SELF_SERVICE_VALUE|APP_ASSIGN_SELF_SERVICE_VALUE_GROUP|LIST_INBOX|LIST_PARTICIPATED_HISTORY|LIST_PARTICIPATED_LAST|LIST_COMPLETED|LIST_PAUSED|LIST_CANCELED|LIST_MY_INBOX|LIST_UNASSIGNED|LIST_UNASSIGNED_GROUP|MESSAGE_TYPE|MESSAGE_TYPE_VARIABLE|EMAIL_SERVER|WEB_ENTRY_EVENT|MESSAGE_EVENT_DEFINITION|MESSAGE_EVENT_RELATION|MESSAGE_APPLICATION|ELEMENT_TASK_RELATION|ABE_CONFIGURATION|ABE_REQUESTS|ABE_RESPONSES|USR_REPORTING|PRO_REPORTING|DASHBOARD|DASHBOARD_INDICATOR|DASHBOARD_DAS_IND|CATALOG|SCRIPT_TASK|TIMER_EVENT|EMAIL_EVENT|NOTIFICATION_DEVICE|GMAIL_RELABELING|NOTIFICATION_QUEUE|PLUGINS_REGISTRY|APP_DATA_CHANGE_LOG|JOBS_PENDING|JOBS_FAILED|RBAC_PERMISSIONS|RBAC_ROLES|RBAC_ROLES_PERMISSIONS|RBAC_SYSTEMS|RBAC_USERS|RBAC_USERS_ROLES|RBAC_AUTHENTICATION_SOURCE|' "; + $string = "tables = 'APPLICATION|APP_SEQUENCE|APP_DELEGATION|APP_DOCUMENT|APP_MESSAGE|APP_OWNER|CONFIGURATION|CONTENT|DEPARTMENT|DYNAFORM|GROUPWF|GROUP_USER|HOLIDAY|INPUT_DOCUMENT|ISO_COUNTRY|ISO_LOCATION|ISO_SUBDIVISION|LANGUAGE|LEXICO|OUTPUT_DOCUMENT|PROCESS|PROCESS_OWNER|REPORT_TABLE|REPORT_VAR|ROUTE|STEP|STEP_TRIGGER|SWIMLANES_ELEMENTS|TASK|TASK_USER|TRANSLATION|TRIGGERS|USERS|APP_THREAD|APP_DELAY|PROCESS_USER|SESSION|DB_SOURCE|STEP_SUPERVISOR|OBJECT_PERMISSION|CASE_TRACKER|CASE_TRACKER_OBJECT|CASE_CONSOLIDATED|STAGE|SUB_PROCESS|SUB_APPLICATION|LOGIN_LOG|USERS_PROPERTIES|ADDITIONAL_TABLES|FIELDS|SHADOW_TABLE|EVENT|GATEWAY|APP_EVENT|APP_CACHE_VIEW|DIM_TIME_DELEGATE|DIM_TIME_COMPLETE|APP_HISTORY|APP_FOLDER|FIELD_CONDITION|LOG_CASES_SCHEDULER|CASE_SCHEDULER|CALENDAR_DEFINITION|CALENDAR_BUSINESS_HOURS|CALENDAR_HOLIDAYS|CALENDAR_ASSIGNMENTS|PROCESS_CATEGORY|APP_NOTES|DASHLET|DASHLET_INSTANCE|APP_SOLR_QUEUE|SEQUENCES|SESSION_STORAGE|PROCESS_FILES|WEB_ENTRY|OAUTH_ACCESS_TOKENS|OAUTH_AUTHORIZATION_CODES|OAUTH_CLIENTS|OAUTH_REFRESH_TOKENS|OAUTH_SCOPES|PMOAUTH_USER_ACCESS_TOKENS|BPMN_PROJECT|BPMN_PROCESS|BPMN_ACTIVITY|BPMN_ARTIFACT|BPMN_DIAGRAM|BPMN_BOUND|BPMN_DATA|BPMN_EVENT|BPMN_FLOW|BPMN_GATEWAY|BPMN_LANESET|BPMN_LANE|BPMN_PARTICIPANT|BPMN_EXTENSION|BPMN_DOCUMENTATION|PROCESS_VARIABLES|APP_TIMEOUT_ACTION_EXECUTED|APP_ASSIGN_SELF_SERVICE_VALUE|APP_ASSIGN_SELF_SERVICE_VALUE_GROUP|LIST_INBOX|LIST_PARTICIPATED_HISTORY|LIST_PARTICIPATED_LAST|LIST_COMPLETED|LIST_PAUSED|LIST_CANCELED|LIST_MY_INBOX|LIST_UNASSIGNED|LIST_UNASSIGNED_GROUP|MESSAGE_TYPE|MESSAGE_TYPE_VARIABLE|EMAIL_SERVER|WEB_ENTRY_EVENT|MESSAGE_EVENT_DEFINITION|MESSAGE_EVENT_RELATION|MESSAGE_APPLICATION|ELEMENT_TASK_RELATION|ABE_CONFIGURATION|ABE_REQUESTS|ABE_RESPONSES|USR_REPORTING|PRO_REPORTING|DASHBOARD|DASHBOARD_INDICATOR|DASHBOARD_DAS_IND|CATALOG|SCRIPT_TASK|TIMER_EVENT|EMAIL_EVENT|NOTIFICATION_DEVICE|GMAIL_RELABELING|NOTIFICATION_QUEUE|PLUGINS_REGISTRY|APP_DATA_CHANGE_LOG|JOBS_PENDING|JOBS_FAILED|RBAC_PERMISSIONS|RBAC_ROLES|RBAC_ROLES_PERMISSIONS|RBAC_SYSTEMS|RBAC_USERS|RBAC_USERS_ROLES|RBAC_AUTHENTICATION_SOURCE|' "; $systemTablesPath = PATH_CONFIG . 'system-tables.ini'; if (!file_exists($systemTablesPath)) { file_put_contents($systemTablesPath, $string); diff --git a/tests/unit/workflow/engine/methods/services/ActionsByEmailDataFormTest.php b/tests/unit/workflow/engine/methods/services/ActionsByEmailDataFormTest.php index f4d348de8..7fcd98507 100644 --- a/tests/unit/workflow/engine/methods/services/ActionsByEmailDataFormTest.php +++ b/tests/unit/workflow/engine/methods/services/ActionsByEmailDataFormTest.php @@ -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'; diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Importer/XmlImporterTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Importer/XmlImporterTest.php index fe0ae0772..efa9263a5 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Importer/XmlImporterTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Importer/XmlImporterTest.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)); } /** diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Services/OAuth2/ServerTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Services/OAuth2/ServerTest.php index e3fb231d9..d224a04b6 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Services/OAuth2/ServerTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Services/OAuth2/ServerTest.php @@ -3,7 +3,6 @@ namespace Tests\unit\workflow\engine\src\ProcessMaker\Services\OAuth2; use \OAuth2\Response as OAuth2Response; -use ProcessMaker\Model\LicenseManager; use ProcessMaker\Model\OauthClients; use ProcessMaker\Model\User; use ProcessMaker\Services\OAuth2\Server; @@ -23,7 +22,6 @@ class ServerTest extends TestCase $this->server = $_SERVER; $_SERVER['CONTENT_TYPE'] = 'application/json'; $_SERVER['REQUEST_METHOD'] = 'POST'; - $this->createTestLicense(); } /** @@ -183,331 +181,4 @@ class ServerTest extends TestCase $response = json_decode($response, true); $this->assertNotEmpty($response); } - - /** - * Create test license - */ - private function createTestLicense() - { - if (!is_dir(PATH_DB)) { - mkdir(PATH_DB); - } - $pathWorkspace = PATH_DB . config('system.workspace') . PATH_SEP; - if (!is_dir($pathWorkspace)) { - mkdir($pathWorkspace); - } - $info = $this->getLicenseInfo(); - $filename = $pathWorkspace . $info['name']; - $data = $info['content']; - file_put_contents($filename, $data); - - LicenseManager::truncate(); - LicenseManager::factory()->create([ - "LICENSE_DATA" => $data, - "LICENSE_PATH" => $filename, - "LICENSE_WORKSPACE" => env('MAIN_SYS_SYS') - ]); - } - - /** - * Get test license information. - * @return array - */ - private function getLicenseInfo() - { - $content = "-------------------------------BEGIN LICENSE KEY-------------------------------- -H5DcVc5NGsrakl0SXVSYjN1M2NJTEliR2VBbkdOcWI1aXRwR3FBZFlwMGRxMTNkbmgybDVLM3o1V1plS -2QzZW9KamlvZXpabGkwMW41NmdXT0ZsY1Y1bFpUT2pYbVF2N21CZVlCcHc4ZDRxcGg3Z09PQmRYaXdhV -ytDb0lXSFk2YmRmWHFFV2FCN2xxUlVwcnVmWXBGMjBtZWV3R3BzajIrTmxwaHFjTGVUb28rY3A1eWpkO -FZ3Z3RLbGJvS2NZM2QzaDd0amNxcCtoWDJBd3JlQWVYTnZnNW0raG9tUmtZdVpzSGFvbTU5MGhOTENrb -2VVaG1PUDVHNmtpNmQxaWFXUWxacUZjbWU1NFpxR1pwUzR0SGg0ZnBsOGk2TENuS1I0dmNtSWs0dUFtV -TJReVd5Y2ZaOVRvY084czZPUW42WEV3S2wydDdlaVpwVGdqNnVTa1c5MXlLR2JwSDk1b01HSGZJaUd6c -UNGaXBHWVpvRzZmbitCWkh6V3Q5dVhucU95cDJtTXBwTi9oMjFZdkxpWG1wYU9ocWJRZ0xTc3diS1VsN -UdMYVgrNWdhQ3RXWHAvekgrcmZYNW11bzZKbzcyYW5JWEt2WWlZb0lDUWNIZVJtNlY1b0tTUmhvWi9oW -kNGakttY2xZMm1wNGlKcThPZXZaNjJtWE8xazVOM2JhZUltbnRWZXBqd1lZdXVwY0JtZ2JwK2VIaDhWN -lNydkllRWo0bVlwcVI0cTZTWWRudll0NTJXakdOOHZhdGxyc3luaFgyUVpvbWNsNXFXdmJpSnQ1ZWVsO -UNRaDRuV2pZK2ZzNnlqZEsydmoyaUZxb2RjanBCVXI2M2Jsc1BEeExMSXU2UlpxN0s2dTcyM28yYVU0S -StyaTVGdm1kaThyTWVUcUxPMnVxT2JWYlcwY1hsK2RXYUJ1bjUzZkh4WHBLdThoNFNQaVppbW9YK3VsW -mlCV0xURWZuZCtlN3k5cTJTdXpLZUVkcEJtdmJDeXFyYm41b3FyazN1QTQ0RjFmK3B6YUlDb2I4ZWd3d -G0xc2IybnJvNjZvNVBacWN5V3hMbkN1WVdJbVhPSGlMdUNpWUpYdE1iQW9idDdrclpzcG9tNmoydHVjT -kt1aFp1ajZiT3J2R2FPcllCN2Y3bUJlMitEeHRhRHBMbXB1SnpCVlpTM2lXaHg3SjEyZVlGanNjRzZvd -VBPNFplMXVibXpyTEs2bk9EZnBybW92cmVjZ3ExK3JYU3BpWjkva1ZYYjE0bTZ1b1M4bWI3S29kMXFvS -nFSaTQrNG5YNWxjM2U5dFkzQ3NKYXl2Tks1eHNpK3RxQ1ZpYkNQYW0vQm5ISmxjRlhxcm5xNHNzR3BxY -nV6dUxwa2NNcVFvbTZvZkhWNWdYT2p4cEd3cHB1NjFhZXVzTGVtZHF5ZHJZcWRqcm1RZFh1QlpyYTBzd -Wlxd2JLK3VPMlp1YkRjckZpSzE0ZUlaS2JkZlhkN2NXOTV0SitndXIzWm5jYkR2MmVldG1wcWg0aTdnb -3lDVjdLKzVLZmZ4Y0N3Vks2M2dZWmxiOEdjYzJOd1ZkKzVxNjYyd2FXeW1hbXRzTFdwMDdmZG5LU3dab -0d3aTJTTmljSnRaNitkWm91MXRhYkc0YWJjek5LbXE3ZTJxYTltZ2JDcXBHeVR0NU4yc29GbXFOaXRsN -khUdmNhbDM5T3hyWjZtdkpmSWVHM1VncFpua3NlT2RwdUhVcHE1dzZtMnQ2MlppTHJndmR6SXVMK1c1b -kNDMHFWdWdKaDdWWG1JelpXR2xvbWxvNUtRaDR1VmxYcWx0YTk0ZHBhWm1JeWtWWlN2aVdSdHM5NnRnS -GQ4dEk2aVpLMTc1THkwdXJPOXVwZVpscEt1b0pKMWxMaTBlSHQrbWE2cHRPQ1B1S2JRenBldnQ1eW5tc -083VktheG4yT1N4NDUybW9kU3JzaXl1b3ExdTVxb3BjN0Q0YzY0dEplVmliQ1BaVy9CbkhKc2NGWHR0Y -W1xdUxpcnI2cUlwN3FxbDlDMzI1ZW9aSCt2Z1lWdXpJaUNaM0NiMXFtMHE0YXV0ZHFndWN2Y3dJcS9xc -XlzdHF1MTVMaWt1YTNGbU4rNXVxbnByRmlLMTRlTWJ0NmtkWGVFV2NDUXdidVYzN0hibHFEQnhMVFZ3W -Fd4eGJ5NnZIYURubjZQcU1pMGk0bUhWT2F6cXNxa21hUFZwcVdHbE8yMHJyaTJ0NHludXF4b2dxdHZtS -khjYldkMmZtaTZ0cGJJdkxOM2wrM0VwcWU2cG9URDM2TFl2T0c4dGNSbWdiQitmb0xqcldpTGZudTE1N -DZ6czk2bG01UGd0czJZamFXc2dJTnl3R1dNa0ZUYnRheWV1TDNBWjU2MmFtcUZpTHVDaFg1dlpzbmFtT -25IeXJ5ZTNMS295WmVZa2E1amJwOXRxM0p5dkg2RmRJQnBzYnV6dHA3UndzNTRvcU90c3BxMnBjK3p3Y -VpZdE14K2QzbDh0STZpWnExNzJzS292N0NyamEycnM5VG1XWk90azNhdGdyZCtxR3R3Y2RxeHVLT3N6c -m1udUpxeWozZVJtNlY1bVd6S2pvVjJuVytUcUxteW02dTF0cU9weTQrUTQ1T0lnbTNtaUgrUFZKWER4c -XFuZ3FMaFkzS3lmb1I2Z2JwK2QzdDhWOEs1M1p5a3NMZUl3SmFndXJlN1ZYSDIxbjU0ZVh0am9McDN1S -2ZBbUlxMWlvdUltSnVadGNhV3BJMnNtWnlDdDM2b2FXdC9wWWQ1bEtXY2ZjRzljWDViajNpbTJyekduW -nJEeWJQWGIydWlqMzUvZzhlQ2EzNTd6cm5leU1YQVZLNnZnWVpwYnNuTGUyTnhsTFJ5Ym9PL3huNTZnV -2F0dkt1Wmc1SGNiV2gwZm1oM2dXT0pmbjlqWnFtVGRIWjNjWEdFb1dTamlaMkRkb1owZG5kMWRuZWhwR -m1UdDVONXRHbXlwZVNlV0lyaGg0aGpwWXk2cjdpYnZLTElxWVc2YXFDa2tZaU9aOUcyazZSM2lMdUNoW -Gh2WnREV3c5N0l6c0NGeHAxcGtLVnVmNU43VlpxWTdhU3BzclRIcmJXMVpvRzZmR2VXa0l1R2lKRmt2Y -kRGbTNtdnZWT0N2YVNVWnJlenNNcmFtTmpMajQ2NWtIaUFhYmkvdDlXVmNzdCtrWCtjcmFtbDY2Nm90T -0Z2a3FhbG0zV0FiS215bDdxM3BkQ255WkxMdVhhQTFvZGhjbzl2ZW5pRmZXSjBqNXFHczNtSWdHeW5mN -EdGWWxhSjFYdHFjRlh3cHFtOHJjS3lhSUszZ0g1OFY2ZS80YWVxdEtsb2dzUnRpb0NKVmFqZXo2bW51c -WFneU9xazJIdW94b0NHZm1ocGY3bUJvYVZ4ZXFqSXZPaXpzNlhibUtPem8yK1NwcVdhZldoc2NzQmxpc -EJVMjdyT2xMeDJqNm1kZld1c2o0YUNhcmkzckxMRjNMYmV6SG1JbTYxL2VKQ2xib1NjWTZXWHArT3Zub -XQvdDM1MmdyZUFlSFZ2ZzhuZWxhaWx0cSszeFp6SXZNSlZjZUtkZElHNmUzcU9rNlRvdTltOHViNnB1R -2wvdVlHaHBuRjZsTXUwM2F5M3QrU2FvYlRnYlhsdTNxUjBkNFJac0oyNnQ2YlFwOG1TeTdsMmdOYUhZW -EtQYjNwNGhYMWlkSSthaHJONWlJQnNwMytCaFdKV2lkVjdaR2R0bkxhbnJhWEhxYVdycGJxc1pIRFVrS -nBzYjJSMmRuaUdZSW1FZkdSdm1aUjNnSHR5ZTRTaFZxN01wNG1BZUxlNnFMaTd1cEt1cXBKOWsyZmJ2Y -Vd0NDVxWXU5TnZrckRVcEhTQnEzRitZby9ScGFWOG4xTyt5YjJwaFlpamM0aC9nbXFFZUdWMGlaMkZxb -21IZldLamZuZUZZbVIra25GalptT3FjV2Q2ZElOMWVtbC91WUYyYjRQRXlxQ2FaSCs1Z1lKcWszREVwc -HZycGFXNXJLV1Z2ZDZaemNqYnVHaVJ0NEI3Zm1pMTJkYWllbi9NZjYxNGZtYk1ySnZCbTYrNHB0RE9ZN -XF6cExKTHI4V2cwR2l5a3NXMXU2clFzcDZ0ZDRpN2dvVjViMmE5MHNqZHk4QzlwdHk5dFhkdHA0aVRlM -VZqVmJXMGNYMStkYmkvdDZsb2dyVnZtWkNMbVpxanVMdTV0cVo3aWNKdFo2dWRacmlzcmFhMTVKblN2Y -zdIcTNoL3VZRjFmNEdTcFdlSmVZWjJySFIwZDVkcVo0bWhmWkZqbTR4K3VZUnVoMDNMdTZUZXNkU2ZlW -S9IZjVxSFVuKyt4Ynk5eHExWGY4eW5ocXlUZWIrWDM3T295SmVUd3R1eG1GaHU3WHRuZzJaMWY3bUJkW -GlCWkpuUXpkZWZwS09vcGJTMWFIdUp3bTFtczRWbWdicDdkbzZUcE9YQzBMaG9rYWlBZDMrNWdhbXRXY -nl6MExQbXRxV282bHR4dUtoOWtxYWxvSDFvdkpqQmxNTzlWS2FzbjJHU3g0NTJsb2RTck1xdnU2dkdzY -Vc0d3R6RDdYdVN0bXlqaWJxUGEyNXcwcmFWb3B6dHFaeTdabzYzZ0hoM2dHbVNwOUM1enFhb3I2V3hyT -U5UZTRuQ2JXZXFuV2FwdWFhaXlOYVQxN3JodUdpUnQ0QjRmWUJwb3FOb2pYR0tkNmQzZDJTb2FuQ0Nub -2VIWTQybHRvQjdhSWROeXNhV3pMektrTHUxeUtxRmlLTnpob2FDYW9aNFpubUdub2VuaVlwdFk2U0llb -1ZzWkg2RWZLWndhYlJqcXIybHg3bTVhWCs1Z1h0dmc3ZmZsSjZ1cGFpenRsV1V5N2h0YUxURWZuZCtlN -3pIcTJpdGU5VElyN3BtZ2JwK2VYbXFsV2VJZElsMXFuZDBkS2RwWm4rZWZZZGptNXB6ZG5wbmZWdUZob -U9iZUpaa2VZL0hmNWVIVXFlMnVxMXFqN3R2ZFpDbmQrL012TDkwMU1Hc3VYNlZ2TW0ybEoyWW5IeXFnM -2lOWnJTd3A3RnBmYWliaWFKdFY1ZTNxN2wrbGJyQnRKZFd4Y1N5cmJ5aXFMbVJoOWpONGJ5MHZiZG1sS -1cwcU5mWXBMMnl6V2UxdW41MXFITllzOVBBdXFYVTJyZXZ1YVZ2WnNpUVk2VnFrbE9TeDQ1NW5XK2tzc -1d5YW9QSGdtMStlOU82MjgzTXY1Zm1jSUxJYkdXQW5HT2xtNS9mb3FxdW83ZWx1cXhtZ2JwOFpwcVFpM -lZsYzNsemVJTmdpWUZ2WkdlemxuU0FkM0ZqaitSdXFwT1B5YXZJdDYrMnNtaUM0NjF1a21hZnJ2Szd1Y -mJjVzNIQ3FINkpiWTNjcUxLdm1NQ1F0TXFyMjYySGJNcU9oSCtGYjJ1c2ozNTZnbmFzcEx2SDJjVGJ2Y -mE2bHFod2dzaHNaSWlFWTI2cGJhOTdXYm0ydktlcmFYK3FnWEp3MUpDaWJWZW1zNzIxdmFLNnNzSlZjZ -UtkZElHNmUzZU9rNmJVemRiQnJYaC9xb0YwZ2JxcXBHcVNac3k2M0xxbnR1Q3BxcmpkdThwVnB0Tjlkb -1dxaDJTUGVLTGdxdEdheXJ5NXQ0V0lvM09HZ0lKcXBMcWtwNzdneU9lNndyS2trM0NDeUd4bGY1eGpsc -WlZMjdXY3FLaTB1S3RwZjdtQmMyNmJlSnRqWm5keGQzbCtZNHh1Z0dSd3JKTitkbmRqZk1lclphU1RqO -GkydXFXNnJLT3FxT1RZV1pPM2szYXpnV1oycDJwcmZKOS9oR09laW5SM2hHcDlaWVdHVkthN24yZVJkc -2U1eE1HbHJIZUl1NEtOZ2xlbHo4Nis1cnE1dVplVmljUytiR2VKdzN0a2JXMzF0SEY5Zm5XcnU3Q29hS -UsxYjVTSW8xVmxjblIyZDRGamlYNS9ZMmFwazNSMmQzRnhoS0ZrbzRtZGczYUhkSFozZW1pQzQ2MXJrb -WJIcHVlc1puL3FjMmVJcUcvS3A5M0x0NnV4b0xCdnRzbWF6YmZHbzd2SGRvRFdoMlJ6ZDd1eHE3OXFjT -GVUbjRXMGU2ckJwTlRDckx5YmwyNm1vcWFlbGVtaXFhMjNkWCs1Z1hWM2dXU1p4c25NcFo2eXVLKzJ2M -VdVd1lsa2FxcWRab3FvdEttMjRKWGx2WTNLcjhxc1pyQ3h0cm5mNlp5OFpMeXQyN200cmVXZ1ZyYmdyc -2ViMU0yMlpxdWxzVXZFeHFiVXRjNnJ2TGgwdWRKdG82SEV4R2k3eUxxV3VMN1V2dDE1d0x1WTRzQzB0c -WFkdmRCaG41K2UzMkdIdTdPMnFibTZaSXV0cUo3RXY4NmhtTHRrcDdXMVU2N0J0S1ZXdnNtcXI2cXFwc -0xVclpQQzI3ZXZ1YVc2dHJhNWRaS3VxcEo0azJmdXdMU3BtWFNwaWFhSGVablF5N2U3dkp6QVRaREpiS -ng2bjFQSnVjQ3F4TUNWbUxtdXZLMTJnNmgraXFhUG5JdUhmbWVnZm5xQ1pHaHVrbkZ0Wm1PMGNXZHJmO -ForZllGbXZLeTBxTXJGMTFWd3RYNTlnWE41d3NiRHFLamVoWCs1Z1hKempwT20yTVhTdExtN283ckF0S -3RwcStaeGlINTdaN1c2Zm5XcGMxaXozY1RGbjlyTHA2VzNtNEpOa01sc200S0hVNUxIam5xZGI2Q3J2c -kN0YW8rc2IzU1U0SSt6azNteG9lcThzOFNUbU1HRWZKeHdZN1cwY1g5K2RiYW51NjIwcm1Sd3haQ1pic -Wg4ZFhtQmM2Yk9zTUtXcU9MVHVLKzJyN1IyckoydGlhakdnSTkrYUxlNXFMUFo1cCs5dG51QTdZRjFkN -0ZiaHNIZHNMeW0zdGVrc2ErcGJVMlF5V3ljZVo5VHVzYTVwdGV5ajUyMndhMXFqN3R2ZFpLbmQ2eUppS -UpmbzRGMGgyWlVmcEo3WTJadHFuRlpoTGVOZFhlQlpydTNwcGJWdThpWGxyYXBhSUxFYllxSGlWVm9xW -lI1YzNkMGJvYWxWS09KcDROMmtIUjJhWCs1Z2FhdFdjdTR1cm52dW1aLzZuTnZpWkN1elpUVTFxU290c -Hh2WnRLL2JKK0R4bXVJaTQ3QTFvZGtjM2UwdmJHNGFuQzNrNkNIdEh1SGZXS2pmbmVGWW1SK2tuRmpab -U9xY1dkNWRJTjBkbmQwZG5kelpaR0duRlZ3dFg1NmdYT2h1cnUwVlhIc25YZDZnV08wdWQrWXVNYk92T -EtjdHJXMGlLK3QxdGlwdmJMTml1ZW9yYkRLbnFqRjA3L0tWYWJkZlhxRVdidVV1TUZVcHJ1ZlpJdU9kc -mpJdTVSK3dxNnh0SnE2cExHZDFydmd2c215b09lVHRMYWJvS0hIczZtYnBlMWpjcngraEhXQWFhaXJ1c -VdueXNiZG5LU3dab0c2aTJTSmdvbFZpdUhNdDJhdHRxKzM1WjNpeDg2L3I4cTlacXl5cDZuYzJLcDR1T -UdxbXEyd3FlK2ltTGphdHN1c2k5NnlacjJjdTQ5MXc1UFV0TmhSdmNiRHNvT3htWis3c3JxdHdyeFZxY -2JPdnVaNXlyS2s2Yk81eUZLandJS2tvcVNaNDZpc3U2WEhyYlcxdDNScGZhaWJpcU5WcWJ1MHEybU1wc -E9HaVZXYzNzUzR1N21tdEhhc3A2MktuNDFveUtteXJLVzVyTS9YbU15cGU0RHRnWFY5c1Z0b2Y1K0NoR -09lbDNWNmFtZDlaWVdHYkp0NGgyektqb3QvaGNPVnE4aTJ0N1oyZzZoK2tLZDN3TUxQd2FmbHMybVFwV -zUvbEh0VnFKam1wcGk4cWJLNHY3ZXBhSUsxYjVHUWkxVnd0WDUzZVl0VnZiM0dvYUxveEtpbHRLVjJkc -XluclltbmRXaVJ0NEI4Zm1pMzR0eWF2V2FVcWJSM2Y3ZXhjbkJ4MHJ6T29kZlpwS3E5V1lpVWo0WnQzb -0tiYTNuR3Ribk11NWRia0xHQ2VJKzdiM1dNcDNmdHpybkFsZVczdDhtYm83elZZMjZmYmFwOHFvTjlqV -2EydktheXNMV2R4c2lMYnFoOGRYbUJjNFBMdmJLWXFlelFwYkdzczJGMnJLZXRpcDZOYUxtMnE2aTRxN -mJVMUt1OVpwUzR0SGg5ZnBsclpvQ2plb2RtbUp4M1pucG5oMXVGa0dLYmFxQ2trWVdGZjRYQ29KMjJ3Y -TJudUttcHFYdW95TFNLa0lkVXBYNTRpbDlrZ1k5eloxWmpxbnRuZVg2RGRHaUN0NEI5ZkZmVXlzcW5xc -lZtZ2JxTGJKTndzS21YNHMrbHFMT21ZNC91bmEyT3FMU0FoM3VBd3JlQWU2cVZuczJ0dldlMXVuNTNxW -E5ZZjU1OWgyT2Jtbk4yZW1kOVc0V0dZcHQ0bFdHSGhJUjFrMzFnYW9WOWVYNTJnNmgramFkMzZMckVzb -FN1d1lHSFkyNXcxYWFmbTVidXFxMnVqY0MwdGJtNGk3K3lwTlBLaTI2b2ZIaUFhYitjdkxseGJxbXpsW -FdBYWJTbXdOYVg1OExqdUkvRHRMVzV1SXUvNE9LcHpHYVV1TFI0ZFg2Wm5adkMwYi9BbzkvVHNyUnNjc -0JsaG8xc2paalhvTVREeUs3U3UxQ0d0cnVwcjdtNlYzL01wNG0wZTh2R290aHdnc2hzYklpRXA1aVhwK -yt6bkx4bWpyZUFlSGFBYWJTYXpidktwcHFocUtlN3RsV1V3WWxrYjdPRmRuWjRkMjZFcFdHamtJMkRkc -EIwZG9GMGRtbXI1bkdQZm51NzM3bTNyZWFuV0lyaGg0NXRqYkNzdnI2c3Y1QjNrYVdsZVpkcmVjYTVzY -2l1bzU2MHdjRzR1V3B3dDVPZGo1eDdrc0JzcElDQmQ1YWp4ZEN0b3BlWDJhNmJmbWFPdDRCM2ZtaHBmY -WliaTZOVnBiU3RxYXh6YnIySWYyNnBzNXgrYUt1d3VNTGRvOVM5NEhXQnYzNTJncmVBZmFxVnFibTR3c -lBoYVgrb3NXbHh3cWgraW0yTjNiaW92WnEvbE1YS205cTIyRk9Tdlk1MW5zQnFjbzl2dUwyMnRKNjN3Z -ExIbkpUS2gyT21pR21scEtPeHg3U21vNVRscHFscFpvNjNnSGgxZ0dtbHA4YTMzWmlVcHFXNnJITnV6S -WlBYkhDYmxYUjNmVzV4aUo1a3FubWRnNENHZElCM2RHaUM0NjFvaVg1N3V1cXJwYmpjbUpxdzRySjVid -DZrZEgrRVdYOWJob3hmbTN5U1lZNTBoSFdkZldCemhYMXFnOGVDYTM1NzRNbmJ6Y3pBVks3QmdZNXNWc -S9Zb3B5aWxOeXRuR3QvMEsyQWZYK25nWE5zbTlIY2JXbDhacTI4dXBkN2ljSnRhYXVkWm5aM2NYR0VvV -1NqaVoyRGRvWjBkbmQwZG5lZ28yZUlkSWwxcW5oMGRLZHJXSXJoaDR0dGpkaWtzNjlaaUo2UGlHU2xhd -GlXdXNuR3FyakFsYXVscnJ1N3k3ZW5xS0hPeU9KN2tzQnNwNGhwdzV1WHVZUjhwbkJsckh0WnZLbTJ1Y -mlzbWJtc3RJWEN5ZHlxcExTb2pxakVtM3VKd20xbnFwMW1xcXkwcE1iYXBPZkMzTUZva2JlQWVIWjJnW -kswVjhXenk2cWF1cW1uN0t1YmI5Mjl5NXphMkdPNnVWZkFuOFRJbDR1OTJKYkpkTVNtMXNDbnFNZXh1M -mk5dGxXVXk5eTQzOHpLbXBQZXM3bURVb2kyeDJHZ3BaZmZzNlZwcGIrcnRibXR1cSt2VmJTZXFtQm5Zc -TI1WjhhbXZySnZwNldaMXJpMXVhWmh5Tm1aazhuT3hybk5zN2lydDNScHErWnhqSDU3dWZPM3FXYXlyS -ENIcUcrOW1NemV1TGl2cW05bXlKQmpuWUtIbzd6QXVhYldzbytkdHNHdGFvKzdiM1dTcDNlc2lZaUNYN -k9CZElkbVZINlNlMk5tYmFweFdZUzNqWHVBYWJxcnViV2UwTVNMYnFoOGU0QnBsNXpSd3NTbG01dWV0N -EI0YzN0MjQ1bmZ2czdHcTdXNHY3ZXBhSUxqcldlU1pudUE3WUYxZHJGYm1yN2x1OE9pek02aXM2NXNiM -mJJa0dLbGFvZHN5bzZKZjRXOW9xSzRzbXFEdUlKbGY4eW5qclI3dTd5cDRicTJ0cGFuY0oycWJXWnU3W -HR0ZzJiRnBicXdzcTFwZlptYmhxU21iM04zZ0duRXFMdkJzcVdmNmRldHRiVzBZNC9hYnFPVTRJMS9rR -2EydktheXNPUGJuTXBtbExpMGVIZCttWW1vdnRHeXlxYll5NjZydkZkdlpzaVFZNXlDaDVUSnViVzV5S -3lVbXNteWFvUEhnbVo5azQrSHFvcU1lbUttZTNtSlVtUituSEZqY0dPcVkzSzhmb1IxZ0dtNXRxdWpxY -2ExelpTcHAyYUJ1b3Rra29oeFpXYXFtSEYyZW01emlKRmtvNU9kZzRDR2RHaUN0NEI5cXBXcXpLWE51d -TFwZjdleGNuQnh6OE80bk5mTHBiS3ZXWWlvdnBCcHBxbWZZbzZPejdpZGdXcGJ2TUt4ckhhRHFINk1uN -CtjaVlkOVlxTitkNFZpWkg2U2NXTm1ZNnB4WjNsMGczUjJkM1IyZUhKbGtZYUxicWg4ZUlCcHY1VEdzM -0Z1cWJPVmVJQnB0S2EzNEtMWG5jN0hwN2lsdWF5SHRiWGUySnJNcmNpem5JSzNmcXR6V0wzWHNNSlZwd -DE5ZUg1eGI1NjZ1YUhackttU3k3VzJwdGF5YzZqRHU2MnJ5TEdrc251b3lMU0tpSWRVMTdPNnVLU2R2d -GFxb3FSVnRiUnhlM1dHZm1pTXNxZXBycHJVZHQyYm1tS250Ylczbk1ERHdaU3E0dEt5WnJhblliV1JwO -Wk4M01HcWRxaW51NldvcU9QWVY3dXp4N1BmcXJpdDVxZFd1Tnh0eHFYUHo3Vm12cVp0ajc3TW04K3RoY -VcvdVhTcHhNR1JtN2JBcldqR3JhYTV2dURKN1huQXUxTGxzNmk1VXBXOHhtR3FxSnp1cGxlNHRMaTJwN -3V0dGJXMVk0R3EwWnlvWXFxcnFNV295N1BDVTUvc2c3bTVyS1ZoeTlxbzIzblJ0THEzcHFlNnFXYXEzT -2lxektuTHVKcTdzMlRncHFiQjNjTzhVOS9TcUdhcnA3Mlh2cm1UMzdIVW4zZkV1YmZKdktLbXRydXJyW -UpxY0xlVG9ZK2N6ZEM5bDVXSnVvOXFibkRJcHBTcXFPeW1xbXQveG41M2VYNW91YWVoeHJmY21KU21wY -nFzYzI3TWlJQnNjSnVWZEhkOGJuR0hubWFuZVoyRGdJWjBnSGQwYUlManJXNlNacytxN0xxdHMrVmJjY -0tvaEpGVnNkTzd1citwc2syUXlXeWNlcDlUeWJuQXFzVEFsWmpKeHJpdGRvT29mb21uZDV5VXlvZGpwW -WhwdWFHcnZNNndsSnFTNTZWc2EzL0dmbmFCWm1pQ3RXK1drSXVqcDZ1bnEybU1sNU4raXFad3NwMW1xc -mE0cjhEZ2xkZk1qNDZ2a0hTQnVuNThnWkxsbU15dHg2eWNncWgrcDNTcGlaK0FrVlhlMzZXNXJhbTJtO -G0vb2RtN2gyekFqb1NBMW9kcGMzZTl2YXJBc2Fpc3Z0OTN0Y3lSZm1XdGNKZkhvWmV6MWJTZ2w1N2ZzM -WRyZjhaK2QzaCthS3EwbXNMS3pwS1pvN2lyYVl5bWszK0liVmlyazNWN2RIRjBnYU5vazRtZGpYYUdmb -lozWm9HNnFxUm9rbWJPdGQ2b3VLblduWmZEMDIrU3BxV2JmSUJzYVgxY2lvTmlubldYWlhlRWhIK1RmV -3BwaFcrRHU0NStiMmJNNGJidXpzcHZiZWFJZ0k5VWxjVERxcCtYbGVhbVdZVEJ2SDUrZ3FXQWVIbHYzT -W1qWjI5a3E3dXd0VldVd1lsbWFMT0ZkSFozY1hHRW9XU2ppWjJEZG9aMGRuZDBkbmVnbzJlSWRJbDFxM -2QwZGF4YmNjS29nWkZWMmN1d3EyeHl3R1dHaVd5TnVOSjR4c083c2NpUm9xTExzbXFEeDRKcGZudmJ2d -DNFZVlpbHJYOTZqMVNrdTZtd29wMmYzNFdwc3JxNFpvRzZmbmQ0ZkZmRnU5eVdwNnUwdXJEQW9YdUp3b -TFucXB0K2FKdXBxc2VSZXRpNjRjaTR1MlM5c0xDeVo5SGZvOGU3ZWJucFo3ZTQ1cXViYjgrNXcxUFUyT -E83dm1OdG1zcktvdUM4aFpMRnVIU20xOEdSbkwyeXJHaTR0NWk1eHRMRDdzeDN0SmZoczdtMnBwbXlnc -XFoVnF6cHRxbHB0TVd6cWF5M3VheTFWY3JFaVhxa3NhdXlySEYzeTdmRm1HU2JucmVBZTN0anlPcWsyS -HVveG9DT2ZtaXRxYWU3NWVXY3kyYVV1TFI0ZG42WnE1dTcwNjdLbU1yT3BMcXZXWWllajRkcnBXcVhZW -WlLZ1hXVWVtQnVkWDE0Z29SNGIzU0pqNUR0azQ2SFZPbXp1Y2libzd5RWZLWndhclJqZmJLOHg3bTRyR -2FCdW54bWs1Q0xwWnF1cWFlNnRwTE54NytZV0xUV2ZuYUJZMk9QNUc2a2k2ZDFxc1c3dExPenA2dlA0S -nVOWnBTNHRIZCtacGwwcVltamgzbWozZE9tcTJ4eXNXV0ZrYVdsZ1o5VHU4UExzOCs4a1ozSWI0T3hqb -mh3dDVPamo1ekx1TUdiNGJWcGtKWnVmcDIwYldkbXRHT3F2cWJHcDdpd3RMcXdzYVBVZUtTY2IzSi91W -UdLYlh1K3hKV2k0dGFzcTdsamZNZXJaYWFUajZPNHhhZXJ1cmV6cU52WXFYaG1sTGkwZUhWK21aeW90T -S9CdkpMUHk3ZXJiSExBWllhUGJJMTZsV0tOZ1lSMmtIMWxXWVY5Z25pRWdtVjBlNmpJdElxSWgxVG92c -XUycHBtdHhxS25tMVcxdEhGNmZZMW1lSGQxZkhSeVpvNkdubE5sY241MmQ0dGppWENLcG5Ddm5XYTV1N -ksxeWVSV3JzeW5qSUI0cGJ5b3JiS28wdCtjZW4vV3JyU0FmNld4YW0ySjZjQ1JaNldNcXJ1em0yOW15S -kJsbllLSFlZZUVoSFdUZldCcGhYMTRlSVI0WlhTSm5ZV3FpWWQ5WXFOK2VJVmlaWUNFZktad1o3UmpwY -XF4dUdhQnVuNTlnV1NsenAzV2xKNnVab0c2aTJlVGNMMmNtZVNGZjdtQmVIdDI0YUc2eHM2OHNuaC91W -UYxZDRHUzE1ekxwOHV1NnJ1dHMrVmJjY0tvZnBGVm1JeCt1WVJyaDAzSno2TFFhcUNra1l5T1o4bXlrY -TNLdjYyN2RvT29mb3FmajV6THZMbVgxTUdzdEphVndzZGpicWx0cTNweGEzYURkWHQwZFhoMGNtaUJoN -XB0YUhKK2RuZHpic3lJaG0xWTc4aTJ1YkN3cjNhc3A2MlFwM1dNdjd5NnZMYXJhYXZtY1lsMmsyZnNyT -ENwMkt5YnJ1TEd4NWlOcGJhQWVuRnZUWkRKYkp4Nm4xTzd3OHV6ejd5Um5iUzZySDEyZzZoK2lhZDNuS -lRLaDJldGNMZkhtNWV6aEh5WGNHTzF0SEdDZm5Xb3RiNnlzcmFqbWRSNHBKeHZjbis1Z1lkdGU4Q3dwN -S9ueW1hQnEzdHhqK1J1cEl5bmRibkxwcm1xdHErMzVOeW14cmQ3Z09PQmRIL3FjMitKa0wzTWxkZlR0c -TZ2cVc5bXlKQmpub0tIZ2NuRHQ2cld3SjJhd0xLNmFIYURxSDZLbm8rY3ZNbXlrK2V6cHJtVHFMT0VmS -1p3WkxON1dYdDBoSGx6ZUhaemQzVlZrb2VqWm1WOGRIWnBqS2FUZjRCdFdPN1RxS2U3cHFDNDBxalllN -mpHZ0lkOWdHbDJkbmlsb0dpS2NZbDRtbmgxZnFwcGNIK2ViNUttcGFCOWFMMnJycC9LeVZTbXU1OXFrW -GExdThTMm5KcTN1YTFxajhXZWZvcWRrTnVUaUlSczdzR0JpV3hXdGRlcWwxaHU3WHRxZTM1MWRIWjNkS -FozY21XUmhwbGpaWEowZG5lQlk0bCtmMk5tcVpOMGQzZHhjWW1UYithVG9ZMW94S1d6ckdhQnVxcWtiW -kpteWJLOXRySzM1cVdmczgvQnZKZXV0bVdCdlhHQlpYZkVtODZ6aDJ6S2pvZDRuVzkxcDdhdnRLM0hhS -m1wZWErMjdyeS9iWVRpdzd1K29KdHV5S2FVcXFqc3BtVnJmOForZDNoK2FLdW5xTVRJMHFPcHE3TzBhW -XltazRHQmJWaTgwcks1dHEycXVOS28yTDJObHFmSnFibG5rSys2NUpOOXZhWE51dXlzY21heXJIQ0RxR -y9Mck52UFpZRzljWVZsZDd5WHpMemFvN3pIZG9EV2gyRnJqMis2cmNDdGxyZSt6TG5iemJ4dmJlYUllS -TVzVm9DU2NtaGpZNjl1YUhsa2czU0FkM1NBZDNKWG5NbWphbTlrdXF1NXhKekl2SEZ1cWJPYWZtaU5xc -m5JNXFiWWU2akdnSWQyZ0dtMnE3UFYxS3E5bzgyKzZxeG1mK3B6Wm9tUWI1S21wWnQxZ0d5YnZLTER3c -UhNck1TZXU0bDJnTmFIWUhOM2I0TzdqbjF2WnNuZnZ0MitlWWlXclg5OGhXSnZ3Wng2YlZpWDZiaWx0Y -k8wcUxscGY2K0JlWERVa0o5dFY3U2x1ckMvbW51SnMyMW10TlorZDNwN1k4Zm1sdWE4Mzd5MnlxMjF0Y -mRvZ3RtdFo1TzNrMzYwYWJTNTJhV2Z3dGF5eVZXbTNYMTNmWEZ2ZThmRmxkQzcySjY0djdtM2cyOXJyS -TkrZVlKMnE2ZXB1dUc2MmIyNHdaZVZpYnFQWTIySWhITmpaMmluY1d4MmRZTmtkbmQrZG5kOFpaRjRwS -1p2YzNXQWFjYWp2YS9EbUpYZHhMaXJhWHkwanFKdHJYdWZnM2VMY1haOGNYZDNrS05ua25TSmY2cDNab -i9xYzJ5SmtNRExsTi9mdG1pRnFvZGtqM2lUNGFuT25iaTJ3S3FGaUsyaWozNTVnN1dDWm51VDZNaTBqW -kZ2bWVpM3EzZHRwNGlWYzIxWVk2cHhaM2wwZzNSMmQzUjJkM0psa1lhWlkyVnlkSFozZ1dPSmYzOWpac -ktGZjdtQmRYdDIzNVhndm8rT3VaQjJkb0Ztczd6YzU2RElzTDZLNTZpdHNNcWVxTVhUdjhwVnB0MTllb -1JadTVTNHdWU211NTlqaVk1Mmt0aTVwS0xGdWExb21iV1dyY1dOcU4vTHpiS2s1bkNDeUd4bGY1eGpsN -XVtM2JPZ3ViaThzN1JwZjdtQmMyK0RnNHR1cUh4NGdHbkZyTW16Y1c2cHM1dCthSzJtb3NqbXB0ak1qN -DY1a0hWNGdXYTRyTnpZbU11cHVLbmJ1Nmxtc3F4d2dLZUhlV1dibTNoemVteDZYWTEyWXB1Q2xXR1JoS -VJubnNCcWNJOXZ2cTNHdTU2eng0K1E3Wk9PaDFTNXQ3L0pwNmF6aEh5bWNHU3NlMW03cWIrcHA3cXBwY -nU3cGNaNHBLWnZjbjVvYVl5bWszK0JiVmpkMHJ1MHM3Q2l1TkNoMTQ2UGpybVFkSUJwWm9HNnFxaHhlc -lRMcnQyc1puL2JjMmFLNFllUWJZM09zcjI0bzd5TXVjbFVwckdmWXBMSGpudWRiNktheWJhMnIzYURtW -DZKcU1pMGlvcUhWT2JEcWNpVnByZlN0Wnlsb2UxamNySitnMys1Z1gyQWFiS3F3OExTcHAybnRtaUN4R -zJLZ1lsVmh1dlNwNnU2dEs2MTNKbmxlWStPdVpCMWQ0Rm1xYm5WMUt1OW83Mm03cXhtZitwelo0aW9iN -Gxqbko5d2RuOWtmMk4xaG1LbGVKVnJoNFIyZ05hSFlXcVBiNzI0dUttcHFialJ0dTYrZVlpbHJYK0FqM -VJtZnBOMllHWm9wM052YVhTRGZuWjNmblozWkhEVWtKOXRWN1c0cDd2R3BudUp3bTF2czRXbHZLaXFyY -lhUb05oN3FOQ3ZrSFY0Z3FXQWVLZXRzc3QralgrY3JybXQyMXR4d3FpQWlXMk5tbk4yZW1kOVc0V0dZc -HQ0bFdHSGhJUjFrMzFnYVlWOWVIaUVlV1YwaWFWM3RjeVJnV3lWdktqQ2wxYUoxWHRrYUcyY3JxYXJyY -itwakxDcHNxdTFWNXpKbzJkdlpMS3ZxcnhWbE1HSlpHbXpoWkcxcWFxdHVaRjYzTDdadDdsNGY3bUJkW -GVCa3RlY3k2ZkxydXE3cmJQbFczSENxSDZSVlppTWZybUVhNGROeWMraTBHcWdwSkdNam1mSnNwR3R5c -it0dTNhRHFINktuNCtjeTd5NWw5VEJyTFNXbGNMSFkyNnBiYXQ2Y1d0MmczVjdkSFI3ZEhSdGdZYVpiV -1Z5Zm5aM2MyN01pSVp0V08vSXRybXdzSzkycktldGtLZDFqTCs4dXJ5MnEybXI1bkdKZHBObjdLeXdxZ -GlzbTY3aXhzZVlqYVcyZ0hweGIwMlF5V3ljZXA5VHU4UExzOCs4a1oyMHVxeDlkb09vZm9tbmQ1eVV5b -2RuclhDM3g1dVhzNFI4bDNCanRiUnhnbjUxcUxXK3NySzJvNW5VZUtTY2IzUi91WUdIYlh2QXNLZWY1O -HBtZ2F0N2NZL2ticVNNcDNXNXk2YTVxcmF2dCtUY3BzYTNlNERqZ1hSLzZuTnZpWkM5ekpYWDA3YXVyN -mx2WnNpUVk1NkNoNEhKdzdlcTFzQ2Rtc0N5dW1oMmc2aCtpcDZQbkx6SnNwUG5zNmE1azZpemhIeW1jR -1N6ZTFsN2RJUjVjM2Q1YzNsNlZaR0dvMk5sZkhSMmFZeW1rMytBYlZqdTA2aW51NmFndU5LbzJIdW94b -0NIZllCcGRuWjRwYUJualhHTGZacDNkSDZuYVhCL25tK1NwcVdnZldpOXE2NmZ5c2xVcHJ1ZmFwRjJ0Y -nZFdHB5YXQ3bXRhby9Gbm42S29KRGJrNGlFYk83QmdZbHNWclhYcXBkWWJ1MTdhbnQrZFhSMmQzUjJkM -0psa1lhWlkyVnlkSFozZ1dPSmZuOWpacW1UZEhkM2NYS0VrMi9tazZHTmFNU2xzNnhtZ2JxcXBHbVNac -1dwMjdlRnFPMmFwTExUc1hsdTNxUjNnR3lsdG83QWVHM2VncFpqa1hiQXFjUzljWjNMcnJhcnVheFhmO -HluaHF1VGViR1g1ckc1dnFLb3Q5R3ZWWEdtdEhKbmYzNTFtSzZ3dDJhM3Jxckl2OWRUckt1d3NtZkVyT -WV4dDZXbDU4eStxMmVSczhQVW1lYk11clN4dTdabXZxMjZyNURVcFhpUW5ZYktaN08ybDNxWnc5ZkR2R -k92MDdXcnJhdThuYzUycGRDNjI1YkpkTHEwMVcybHJMcS9hS25KdkoycHgrRyszYnJMdHFIaGZHbVFwV -zZDbkdPbnI2UGZZM0s4Zm90K2FLMnBwN3UzcDhiSmkyNm9mSFY0Z1hPbHZycTBsS25ld3FpbnU2WmpqK -1J1cEpLbmRYaUdkWHQwZEh4MG9heFhpWGVUZUxHQmRIU1pkS21KcFlkNXFkRGN0cSs1cFc5bXlKQnBwV -3FybXMvSXliZkliMnVzajM1NmduYTZtckMrenNqZnVNdkdvdGh3Z3Noc1pJaUVZMjZwYmF0emNXdW93c -nUwczdPbnE2R2l4WXVMYnFoOGRJQnBjMjdNaUlSdFdPblZyYW1zWTN5NHEyU3V6S2VNZ0hpb3RiNnlzc -mJSMTZwNmY4Si9xb0szZnExeldNSFB3Y0NoMG94K3FvUm5pSjZQaDJXbGF0aW11Y2UzdDh5OXBLTEV1N -3RxajdGdmRKVGdqN09UZWIybjFicXd5SnFad0lSOHBuQmtyWHRabWJiQ3A2dTZ0N09vclpyVGRvdHVxS -HgxZDRGemxzdXpzS2ViMk1lbHVxeGpmTWVyWmF5VGo0VjJoM2x6ZDNwemVLbVRhSXQrakh5MGQzUm1zc -Xh3Z0orSGVhamJ6cVM2cjVheGpNbTdWS2E3bjJLUWpuWjNrMzVsWm9XRGRYbU5hR1ozazZDTXRJbUhiM -jNtaUgyUFZLZkN3N1dvcVZXMXRIR0NmbldsdktpdHNxaWtvY1o0cExDZWZIVjZnckp0aW9XSnJxbXpsM -zVvcnJhcXVKTnY1cE9naFlCNGRIWjNkSFozb0tObmlIU0pkYXAzZEhTbmFXWi9ubjJIWTV1YWRIWjZaN -FJOa01sc240S0huN2pCdVdlZXdHcHFob2RxcThPc21wZTh6c1BvdnNsdmJlYUllNDlVb3JmRnJGVnhwc -lJ5YVlObWxyT3FyR1NacXFPano3dmJWWEMxZm5kNGkxVzlzOEtXcU9MVHVLKzJyMk9QNUc2a2s0K0FhS -kczZ0h0K2FMdnA0NXg2Zjh4L3NvRm1xdHlhcXNUZ3NzcFZwdDE5ZDN4eGI1MjZ3cGZNdThxUXU3WElxb -1dJbzNPR2hvSnFobmhtZVlhZGlxZUxqMjFpbzRoM2hXeGtmb1I4cG5CcXRHT3RycmJHcmJXMVpvRzZmR -3liZUsrY3JiYTV1S3h6YnN5SWdHVndtOVdwc3F5aXRMblFxT3pKMG5XQnlYNTJnV1pvZ3VPdGFJcCtlN -m5wdnJLdzVwcWFydHV4akZXbTNYMTJoRmx2WnNpUVo2VnExYVBBdDdsbm5yRnFhWkRBZ29HT2FwbXowT -nZCNmJxN3dGU3V0NEdHYmFlSW1IdFZxSlR1cXFXd1pvNm9nSGQvdVlGemFKdDQzS2lYdGFlNHNNR253c -jI5cGxpMHpINTJnclI3amF0VzQ4N1B2Ni9Kckt1NVpvRzZxcVJxa21hcHQrbXFxYmZxcHBlNjA3OTNWY -WJkZlhkN2NXK094N3VUMzYzRWxiakl1V2Vld0dwcWpvZHFlb1I1YW5HSm9vS3NrWGQ5WXExK2Q0OWlaS -ENkdEcxblpMUmpyTG1vdExpcnBxaW51NmRYbk1talpHNThabmgzZ21pR2ZvUmdhTEdEZEhhQmNYR09vV -1NWbE9DTmZKQm11YnVsdXJ6amxYTExmcEovbktpNnBlQ2xsN0hhc25sdTZOTjlkMzl5cm1XR2pXem11N -Tlsa1hhN3VzeXhVblRJaDN0NmptcGxkSW1kaGFxSmgzMWlvMzUzaFdKa2ZwSnhZMlpqcW5GbmVYU0VkS -FozZFdpQ3RXK1ZrSXVobHErcGFJTEViWkdJY1pTcjNjeTRrcmFvWTQva2JxZVRqOEd2dWE5b2dyZUFmN -nFWbU0yb3dybkd0cXRtc3F4d2dKK0hlWmZRM2FhNHM2ZkJsTVRFVkthN24yS0lobzVudGJLWG9zakJyY -nJIYUpxNnZ0L09tcnE3dXB2aGJxaTRwcDI5MEdHY3BGUGJZYU80cTRGa21xK3BacWlscWNyRjE2WlZxN -0ptcUxXZ3dyeTRwcXJyeExpdnRxOWh4OWFvNThMYnVybDJzN2E3cmJXMTQ1T1l5cWw1dDkrdXJiZnJuc -WkwMG0zQW9ZdmVxNnRxbzd5U2czaHQzb0taYTNuSXpiWEliMnVzajRXQ2FycXRscmpPMzdydGU1TEFiS -1NBZ1hla21ickhvcWFia3Q2aXE2NW1qcmVBZUgyQWFYUmxrb3VXWTJodmRucG5nV09UZm45dFpxbUZmN -21CZUh0MjU1bmx6TmJDdEhoL3VZRjdnR20yM0svTXVjdXFuSUszZnFocmNISGdzc09Zek4yb3BiNnd2W -kIza2FXbGVKOVRlWS9IZjVSL2FsdTV2TCsyd0xlV3FMamF1YTk3a3NCc280aHBkMjJuaUpkN1ZhYWw0N -lNjYTMrM2ZuYUN0NENBZkZmRnhlQ2hvYkdscXJwemJzS0lmMjZwczVsK2FMbWl0YjNmbTVXVTBZMTJrY -mVBZUhlQWFlUG9tY3VueTY3cXU2Mno1YXhZaXRlSGgyN2VwSHlBYktmQ2pjRy9wZE90MTFPU3g0NTJsb -2RTaWNlOHE2M0h1NktseE5MSG1udVN3R3lrZjRGM2xhYXp3N1dZbFpmYnRaeHJmOForZDRCK2FIbHlac -GFEbVdaaWRIaG1kNEZ0aVg2SlkyYWJucmVBZUhKN2R1YWsxN3JodUtXNnBicXNab0c2cXFSd2ttYUxkY -XQ4Y1hTcVptaURqbjJIYlp1YWZYWjZXWWllajR4c2pidlprc3ZKeDJlZXdHcHlqMitwdnJXeG9hVzcyY -nFjbE5TMmJLU0VnclpzWllXY3ZLWndaN1JqbnI2dHQyYUJ1bjU1ZVh4WGtZYVpZMlZ5ZEhaM2dXT0pmb -jlqWnFtVGRIWjNjWEdFb1dTamlwMkRkb3BtZ2JwK2VvR1M0WmpGcVh1QTdZRjFlTEZibDdMaXRzYWgzc -Xk4aTdlWXRwZDNrYVdsZko5VHhiMjNzSVdJbzNPR2dZSnF0YXVwcmNqYnlMelNuTHFUM0xwcGtLVnVmN -U43VlpxWTdhU3BzclRIcmJXMVpvRzZmR2lZa0l0NG82T21zcXpFVTgyMnRGTjMzTmV0dGJXMFlaYnFWT -GpHenJ5eWRxcXJxTGk3dWRXaFdaTzNrM20wYWJpOTU1NVlpdUdIajIyTjBLaW52cXkva01oNGJkNkNsb -U9SZHNhcXo3S1JyTHFzcktuSXJWZC96S2VHczVONWYyS2tnM1NGWldHQWxtRmpabTJxY1hGNWRIVi91W -UY3Z0dtNG10UEowcUtqWkgrNWdZaHRlNVM0cTZydTFhbG9nclI3aGFOdWxjdlN2NnUzdDZ1bXVMKzMxW -lZ5eTM2SmY1eHBmN2V4YW1pSmtMSEdxdG5Xc3FldWxycVBpbmh0M29LVmEzbDJqN2lkZ21wYnhiK3hxN -2xxY0tpVG5aRHRrNUNIVk5lOXZzT2VvNi9HdEZWeG5MUnpib1MzalhxQWFiYW51NnVqeUhpa2wyOXlmN -21CZ21hVGNNS29tT3pHdHErM3RhckQzNmVWbE5hTmRwRzNnSUIrYUxmbDFhUEJ0OEdxN0dsL3Q3RnFhW -W1RbmNtaXpzKzJ1YmVZdUpESGRsU211NTlpaUk1MnFOV3lrYTI2ckt5cHlLMVhmOHluaHJPVGVYOWlwS -U4waFdWaGdKWmhZMlp0cW5GeGVYUjFmN21CZFhlQlpLclJ1c3FubXFHb3A3dTJWWlRCaVdSdnM0VjJkb -mgyYm9Ta1lhV05qWU4ya0hSMmdYUjJhYXZtY1k1K2U3anVxTGk1Nmx0eHdxaUdrVlhNNEtTdnRwaXZsN -3A0YmVqRjRsT1N4NDUzbVlkU2ZLcWduSmVoalllanJMS24wS0tha3BIRGs1bWxkNGlqbzQxVmNhYTBkS -EZyczdtcWFJSzNnSGg3YjRPWnZvYUprWkdMbWJDR3JZK2hoNVc5cEppTGFYeTBqcUprclh1ZGhuV0pkW -FY1ZEhkK2txNnFrbldRZjV5S21aZkxpSU9Vd0t5Y2dhL0poNGVlZkc5bXlKQmptNEtIWVl5RGhIYVNmM -kJxakcrRHU0NTViWDU3c0tyTnJhYWFkOFd0bnFTRWY2R3lnblo3VmJXMGNZRitkYnUxdWErc3M3R3NnN -UhjYlcxOFpvdVVrbnlscmFPQ1dMVFdmbmQ4ZTJPZTRKemhtYkRDc3NXM3AzV250YlNTcnFxU2RveC9uS -XFabDh1SWc1VEFyS3A0dmNDSW1KMldqbTZwbjRHNWFxQ2trWTJPWjlMRGxhdk12N0c4dVdwd3Q1T2hqN -XlwbzQ2QWxZbTZqMlZraUlTRm1LeVk1ckNudHFuQnVHYWRxYmk2cTZUUGRwWlRlYWU2WnB1MmxNWndpc -Vp3cXBOK2FJMktrNmZGazhHYXVwaG9rYmVBZ0g1b2p1WFVxYnl0dXJQYmFYKzNzWEp3Y2JxT3FvZkt1S -VNUajFtSW5vK0diSTFxb0tTUmhZcC9oWkYvaHBhV2xxZXJsNGVQckwyV3ZaNTVpS1d0aG9GM3FhUEF6Y -WVmcGFxY2ZLcURkWVIrYUpPTms1Q1dsTGFwcm9XSVpIKzVnWUZ0ZTNDS3BuQ3FtMzVvbXBhUnBNQ0d4N -2pBcDRlb21LV0xoWnFNa3E2cWtuV0pmNXgzZDNPcWFtV0JubjZPVmFiZGZYZUFjVzkrcXFhQ3VwcTVrS -nlpbUtTbmpvUitkNGk3Z29WNGIyYUpvb1NxaW9aL1lxU0ZhWkNsYm9LY1k0ZVBnNzlqY3J4K2czNW9hW -Cs1Z1hObm0zaTdlSWFYaVptYnNIZWFvcFJWY2V5ZGRYK0JZM09Fb211Z2lhQ0FlWWRrZDN4K2VuNnFwb -XA2Zjh4L3NZRm1vOGVCaHE2OW9IbHUzcVI0Z0d5RHRwbkt6bFNtdTU5aWlZNTJwTE9WZ0ppcmtwcWJuW -mVEWnBUZ2o3Q1RlWUpncDN4N2lsUnZ5OVY3Wm5CVnhvcDZhMyswZm4yQnY3bUJkRytEbjYxVmNLdCtlS -HVFWlpDSndtMXBzNFdYbUoxamZNZXJacWVUajcrdnVhbTB1cWwwdCtMaW1yMjN6TExic3FtMnBaeWx2S -kNJeW0ya3BHV2RtWW1ZZnFXWGRiQnFvS1NSaDQ1bjA3cGpXNURBZ255T2FvbWRxYkozdGN5UmZXeVZjS -UxJYkdpSWhJZDhnbmljZktxRGQ0UithTE90cWF5d3FNYTFvS2lYcW5lcWo2UmxoTENtcEpmSXo3S2dkM -itsdGVWV3JzeW5pWUI0bDR1WmpZZVRrcTZxa25hU2Y1eDhpblN1Ym1PSHNwR2JaNWllYzNwN2gzcDVyc -W1Gc25XblphNldtbWVld0dwcWhvZHFsSjJWZnBpNHdxaS9xNnB2YmVhSWQ0OVVWb25mdmc9PQ== ---------------------------------END LICENSE KEY---------------------------------"; - return [ - "name" => "license_7ubh3dHS2+bWqaOlnZ0.dat", - "content" => $content - ]; - } } diff --git a/workflow/engine/bin/cron_single.php b/workflow/engine/bin/cron_single.php index 6780fc46d..211510e08 100644 --- a/workflow/engine/bin/cron_single.php +++ b/workflow/engine/bin/cron_single.php @@ -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"); diff --git a/workflow/engine/bin/tasks/cliAddons.php b/workflow/engine/bin/tasks/cliAddons.php deleted file mode 100644 index 877e95b76..000000000 --- a/workflow/engine/bin/tasks/cliAddons.php +++ /dev/null @@ -1,91 +0,0 @@ - $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" ); - } - } -} diff --git a/workflow/engine/bin/tasks/cliUpgrade.php b/workflow/engine/bin/tasks/cliUpgrade.php index 78bed0433..cbe6a13c8 100644 --- a/workflow/engine/bin/tasks/cliUpgrade.php +++ b/workflow/engine/bin/tasks/cliUpgrade.php @@ -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(); diff --git a/workflow/engine/bin/tasks/cliWorkspaces.php b/workflow/engine/bin/tasks/cliWorkspaces.php index 90c5cc43a..53bd8c73e 100644 --- a/workflow/engine/bin/tasks/cliWorkspaces.php +++ b/workflow/engine/bin/tasks/cliWorkspaces.php @@ -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(); diff --git a/workflow/engine/classes/DashletProcessMakerEnterprise.php b/workflow/engine/classes/DashletProcessMakerEnterprise.php deleted file mode 100644 index bf6774b08..000000000 --- a/workflow/engine/classes/DashletProcessMakerEnterprise.php +++ /dev/null @@ -1,34 +0,0 @@ -"; - } - - public function setup($config) - { - return true; - } - - public function render($width = 300) - { - $path = PATH_TPL . "/dashboard/dashletProcessMakerEnterprisePm3.html"; - $html = file_get_contents($path); - echo $html; - } - -} diff --git a/workflow/engine/classes/DashletRssReader.php b/workflow/engine/classes/DashletRssReader.php index c01408894..ccd36650a 100644 --- a/workflow/engine/classes/DashletRssReader.php +++ b/workflow/engine/classes/DashletRssReader.php @@ -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; } diff --git a/workflow/engine/classes/EnterpriseClass.php b/workflow/engine/classes/EnterpriseClass.php deleted file mode 100644 index 6e6a1633e..000000000 --- a/workflow/engine/classes/EnterpriseClass.php +++ /dev/null @@ -1,133 +0,0 @@ -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); - } - } -} diff --git a/workflow/engine/classes/EnterpriseUtils.php b/workflow/engine/classes/EnterpriseUtils.php deleted file mode 100644 index 70a26187d..000000000 --- a/workflow/engine/classes/EnterpriseUtils.php +++ /dev/null @@ -1,152 +0,0 @@ -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; - } -} diff --git a/workflow/engine/classes/License_Application.php b/workflow/engine/classes/License_Application.php deleted file mode 100644 index 159b87502..000000000 --- a/workflow/engine/classes/License_Application.php +++ /dev/null @@ -1,500 +0,0 @@ -_check_secure(); - $this->_LICENSE_PATH = $license_path; - $this->init($use_mcrypt, $use_time, $use_server, $allow_local); - if ($this->USE_SERVER) { - $this->_MAC = $this->_get_mac_address(); - } - } - - /** - * set_server_vars - * - * to protect against spoofing you should copy the $_SERVER vars into a - * seperate array right at the first line of your script so parameters can't - * be changed in unencoded php files. This doesn't have to be set. If it is - * not set then the $_SERVER is copied when _get_server_info (private) function - * is called. - * - * @access public - * @param $array array The copied $_SERVER array - * */ - public function set_server_vars($array) - { - # check to see if the class has been secured - $this->_check_secure(); - $this->_SERVER_VARS = $array; - # some of the ip data is dependant on the $_SERVER vars, so update them - # after the vars have been set - $this->_IPS = $this->_get_ip_address(); - # update the server info - $this->_SERVER_INFO = $this->_get_server_info(); - } - - /** - * _get_os_var - * - * gets various vars depending on the os type - * - * @access private - * @return string various values - * */ - public function _get_os_var($var_name, $os) - { - $var_name = strtolower($var_name); - # switch between the os's - switch ($os) { - # not sure if the string is correct for FreeBSD - # not tested - case 'freebsd': - # not sure if the string is correct for NetBSD - # not tested - case 'netbsd': - # not sure if the string is correct for Solaris - # not tested - case 'solaris': - # not sure if the string is correct for SunOS - # not tested - case 'sunos': - # darwin is mac os x - # tested only on the client os - case 'darwin': - # switch the var name - switch ($var_name) { - case 'conf': - $var = '/sbin/ifconfig'; - break; - case 'mac': - $var = 'ether'; - break; - case 'ip': - $var = 'inet '; - break; - } - break; - # linux variation - # tested on server - case 'linux': - # switch the var name - switch ($var_name) { - case 'conf': - $var = '/sbin/ifconfig'; - break; - case 'mac': - $var = 'HWaddr'; - break; - case 'ip': - $var = 'inet addr:'; - break; - } - break; - } - return $var; - } - - /** - * _get_config - * - * gets the server config file and returns it. tested on Linux, - * Darwin (Mac OS X), and Win XP. It may work with others as some other - * os's have similar ifconfigs to Darwin but they haven't been tested - * - * @access private - * @return string config file data - * @see _get_ip_address() - * @see _get_mac_address() - */ - public function _get_config() - { - # check to see if the class has been secured - $this->_check_secure(); - if (!$this->USE_SERVER) { - return 'NOT_USE_SERVER_CONFIG'; - } - # if anyone has any clues for windows environments - # or other server types let me know - $os = strtolower(PHP_OS); - if (substr($os, 0, 3) == 'win') { - # this windows version works on xp running apache - # based server. it has not been tested with anything - # else, however it should work with NT, and 2000 also - # execute the ipconfig - @exec('ipconfig/all', $lines); - # count number of lines, if none returned return MAC_404 - # thanks go to Gert-Rainer Bitterlich - if (count($lines) == 0) { - return 'ERROR_OPEN'; - } - # $path the lines together - $conf = implode($this->_LINEBREAK, $lines); - } else { - # get the conf file name - $os_file = $this->_get_os_var('conf', $os); - # open the ipconfig - $fp = @popen($os_file, "rb"); - # returns invalid, cannot open ifconfig - if (!$fp) { - return 'ERROR_OPEN'; - } - # read the config - $conf = @fread($fp, 4096); - @pclose($fp); - } - return $conf; - } - - /** - * _get_ip_address - * - * Used to get the MAC address of the host server. It works with Linux, - * Darwin (Mac OS X), and Win XP. It may work with others as some other - * os's have similar ifconfigs to Darwin but they haven't been tested - * - * @access private - * @return array IP Address(s) if found (Note one machine may have more than one ip) - * @return string ERROR_OPEN means config can't be found and thus not opened - * @return string IP_404 means ip adress doesn't exist in the config file and can't be found in the $_SERVER - * @return string NOT_USE_SERVER_CONFIG the server configuration is not used in license validation. - * - * @see set_server_vars() - */ - public function _get_ip_address() - { - $ips = array(); - # get the cofig file - $conf = $this->_get_config(); - # if the conf has returned and error return it - if ($conf != 'NOT_USE_SERVER_CONFIG' && $conf != 'ERROR_OPEN') { - # if anyone has any clues for windows environments - # or other server types let me know - $os = strtolower(PHP_OS); - if (substr($os, 0, 3) == 'win') { - # anyone any clues on win ip's - } else { - # explode the conf into seperate lines for searching - $lines = explode($this->_LINEBREAK, $conf); - # get the ip delim - $ip_delim = $this->_get_os_var('ip', $os); - - # ip pregmatch - $num = "(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])"; - # seperate the lines - foreach ($lines as $key => $line) { - # check for the ip signature in the line - if (!preg_match("/^$num\\.$num\\.$num\\.$num$/", $line) && strpos($line, $ip_delim)) { - # seperate out the ip - $ip = substr($line, strpos($line, $ip_delim) + strlen($ip_delim)); - $ip = trim(substr($ip, 0, strpos($ip, " "))); - # add the ip to the collection - if (!isset($ips[$ip])) { - $ips[$ip] = $ip; - } - } - } - } - } - - # if the conf has returned nothing - # attempt to use the $_SERVER data - if (isset($this->_SERVER_VARS['SERVER_NAME'])) { - $ip = gethostbyname($this->_SERVER_VARS['SERVER_NAME']); - if (!isset($ips[$ip])) { - $ips[$ip] = $ip; - } - } - # count return ips and return if found - if (count($ips) > 0) { - return $ips; - } - if (isset($this->_SERVER_VARS['SERVER_ADDR'])) { - $name = gethostbyaddr($this->_SERVER_VARS['SERVER_ADDR']); - $ip = gethostbyname($name); - if (!isset($ips[$ip])) { - $ips[$ip] = $ip; - } - # if the $_SERVER addr is not the same as the returned ip include it aswell - if ($ip != $this->_SERVER_VARS['SERVER_ADDR']) { - if (!isset($ips[$this->_SERVER_VARS['SERVER_ADDR']])) { - $ips[$this->_SERVER_VARS['SERVER_ADDR']] = $this->_SERVER_VARS['SERVER_ADDR']; - } - } - } - # count return ips and return if found - if (count($ips) > 0) { - return $ips; - } - # failed to find an ip check for conf error or return 404 - if ($conf == 'NOT_USE_SERVER_CONFIG' || $conf == 'ERROR_OPEN') { - return $conf; - } - return 'IP_404'; - } - - /** - * _get_mac_address - * - * Used to get the MAC address of the host server. It works with Linux, - * Darwin (Mac OS X), and Win XP. It may work with others as some other - * os's have similar ifconfigs to Darwin but they haven't been tested - * - * @access private - * @return string Mac address if found - * @return string ERROR_OPEN means config can't be found and thus not opened - * @return string MAC_404 means mac adress doesn't exist in the config file - * @return string NOT_USE_SERVER_CONFIG the server configuration is not used in license validation. - * - * @see __construct() - */ - public function _get_mac_address() - { - # open the config file - $conf = $this->_get_config(); - - # if anyone has any clues for windows environments - # or other server types let me know - $os = strtolower(PHP_OS); - if (substr($os, 0, 3) == 'win') { - # explode the conf into lines to search for the mac - $lines = explode($this->_LINEBREAK, $conf); - # seperate the lines for analysis - foreach ($lines as $key => $line) { - # check for the mac signature in the line - # originally the check was checking for the existence of string 'physical address' - # however Gert-Rainer Bitterlich pointed out this was for english language - # based servers only. preg_match updated by Gert-Rainer Bitterlich. Thanks - if (preg_match("/([0-9a-f][0-9a-f][-:]){5}([0-9a-f][0-9a-f])/i", $line)) { - $trimmed_line = trim($line); - # take of the mac addres and return - return trim(substr($trimmed_line, strrpos($trimmed_line, " "))); - } - } - } else { - # get the mac delim - $mac_delim = $this->_get_os_var('mac', $os); - - # get the pos of the os_var to look for - $pos = strpos($conf, $mac_delim); - if ($pos) { - # seperate out the mac address - $str1 = trim(substr($conf, ($pos + strlen($mac_delim)))); - return trim(substr($str1, 0, strpos($str1, "\n"))); - } - } - # failed to find the mac address - return 'MAC_404'; - } - - /** - * _get_server_info - * - * used to generate the server binds when server binding is needed. - * - * @access private - * @return array server bindings - * @return boolean false means that the number of bindings failed to - * meet the required number - * */ - public function _get_server_info() - { - if (empty($this->_SERVER_VARS)) { - $this->set_server_vars($_SERVER); - } - # get the server specific uris - $a = array(); - if (isset($this->_SERVER_VARS['SERVER_ADDR']) && (!strrpos($this->_SERVER_VARS['SERVER_ADDR'], '127.0.0.1') || $this->ALLOW_LOCAL)) { - $a['SERVER_ADDR'] = $this->_SERVER_VARS['SERVER_ADDR']; - } - # corrected by Gert-Rainer Bitterlich , Thanks - if (isset($this->_SERVER_VARS['HTTP_HOST']) && (!strrpos($this->_SERVER_VARS['HTTP_HOST'], '127.0.0.1') || $this->ALLOW_LOCAL)) { - $a['HTTP_HOST'] = $this->_SERVER_VARS['HTTP_HOST']; - } - if (isset($this->_SERVER_VARS['SERVER_NAME'])) { - $a['SERVER_NAME'] = $this->_SERVER_VARS['SERVER_NAME']; - } - if (isset($this->_SERVER_VARS['PATH_TRANSLATED'])) { - $a['PATH_TRANSLATED'] = substr($this->_SERVER_VARS['PATH_TRANSLATED'], 0, strrpos($this->_SERVER_VARS['PATH_TRANSLATED'], '/')); - } elseif (isset($this->_SERVER_VARS['SCRIPT_FILENAME'])) { - $a['SCRIPT_FILENAME'] = substr($this->_SERVER_VARS['SCRIPT_FILENAME'], 0, strrpos($this->_SERVER_VARS['SCRIPT_FILENAME'], '/')); - } - if (isset($_SERVER['SCRIPT_URI'])) { - $a['SCRIPT_URI'] = substr($this->_SERVER_VARS['SCRIPT_URI'], 0, strrpos($this->_SERVER_VARS['SCRIPT_URI'], '/')); - } - - # if the number of different uris is less than the required amount, - # fail the request - if (count($a) < $this->REQUIRED_URIS) { - return 'SERVER_FAILED'; - } - - return $a; - } - - /** - * validate - * - * validates the server key and returns a data array. - * - * @access public - * @return array Main object in array is 'RESULT', it contains the result - * of the validation. - * OK - key is valid - * CORRUPT - key has been tampered with - * TMINUS - the key is being used before the valid start date - * EXPIRED - the key has expired - * ILLEGAL - the key is not on the same server the license was registered to - * ILLEGAL_LOCAL - the key is not allowed to be installed on a local machine - * INVALID - the the encryption key used to encrypt the key differs or the key is not complete - * EMPTY - the the key is empty - * 404 - the the key is missing - * */ - public function validate($str = false, $dialhome = false, $dialhost = "", $dialpath = "", $dialport = "80") - { - # check to see if the class has been secured - $this->_check_secure(); - # get the dat string - $dat_str = (!$str && !is_null($this->_LICENSE_PATH)) ? @file_get_contents($this->_LICENSE_PATH) : $str; - if (strlen($dat_str) > 0) { - # decrypt the data - $DATA = $this->_unwrap_license($dat_str); - if (is_array($DATA)) { - # missing / incorrect id therefore it has been tampered with - /* - *Disable to accept licenses from other workspaces - *if ($DATA['ID'] != G::encryptOld($this->ID1)) { - $DATA['RESULT'] = 'CORRUPT'; - }*/ - if ($this->USE_TIME) { - # the license is being used before it's official start - if ($DATA['DATE']['START'] > time() + $this->START_DIF) { - $DATA['RESULT'] = 'TMINUS'; - } - # the license has expired - if (intval($DATA['DATE']['END']) - time() < 0 && $DATA['DATE']['SPAN'] !== 'NEVER' && $DATA['DATE']['SPAN'] !== '~') { - $DATA['RESULT'] = 'EXPIRED'; - } - $DATA['DATE']['HUMAN']['START'] = date($this->DATE_STRING, $DATA['DATE']['START']); - if (($DATA['DATE']['END'] == "") || ($DATA['DATE']['END'] == "NEVER")) { - $DATA['DATE']['HUMAN']['END'] = "PERPETUAL"; - } else { - $DATA['DATE']['HUMAN']['END'] = date($this->DATE_STRING, $DATA['DATE']['END']); - } - } - if ($this->USE_SERVER) { - $mac = $DATA['SERVER']['MAC'] == $this->_MAC; - $path = count(array_diff($this->_SERVER_INFO, $DATA['SERVER']['PATH'])) <= $this->_ALLOWED_SERVER_DIFS; - $domain = $this->_compare_domain_ip($DATA['SERVER']['DOMAIN'], $this->_IPS); - $ip = count(array_diff($this->_IPS, $DATA['SERVER']['IP'])) <= $this->_ALLOWED_IP_DIFS; - - # the server details - if (!$mac || !$path || !$domain || !$ip) { - $DATA['RESULT'] = 'ILLEGAL'; - } - - # check if local - $local = $this->ALLOW_LOCAL && (in_array('127.0.0.1', $DATA['SERVER']['IP']) || $DATA['PATH']['SERVER_ADDR'] == '127.0.0.1' || $DATA['PATH']['HTTP_HOST'] == '127.0.0.1'); - if (!$local) { - $DATA['RESULT'] = 'ILLEGAL_LOCAL'; - } - } - # passed all current test so license is ok - if (!isset($DATA['RESULT'])) { - # dial to home server if required - if ($dialhome) { - # create the details to send to the home server - $stuff_to_send = array(); - $stuff_to_send['LICENSE_DATA'] = $DATA; - $stuff_to_send['LICENSE_DATA']['KEY'] = G::encryptOld($dat_str); - # dial home - $DATA['RESULT'] = $this->_call_home($stuff_to_send, $dialhost, $dialpath, $dialport); - } else { - # result is ok all test passed, license is legal - $DATA['RESULT'] = 'OK'; - } - } - /* - */ - # data is returned for use - return $DATA; - } else { - # the are two reason that mean a invalid return - # 1 - the other hash key is different - # 2 - the key has been tampered with - return array('RESULT' => 'INVALID'); - } - } - # returns empty because there is nothing in the dat_string - return array('RESULT' => 'EMPTY'); - } - - /** - * _call_home - * - * calls the dial home server (your server) andvalidates the clients license - * with the info in the mysql db - * - * @access private - * @param $data array Array that contains the info to be validated - * @param $dialhost string Host name of the server to be contacted - * @param $dialpath string Path of the script for the data to be sent to - * @param $dialport number Port Number to send the data through - * @return string Returns: the encrypted server validation result from the dial home call - * : SOCKET_FAILED => socket failed to connect to the server - * */ - public function _call_home($data, $dialhost, $dialpath, $dialport) - { - print "_call_home($data, $dialhost, $dialpath, $dialport)"; - # post the data home - $data = $this->_post_data($dialhost, $dialpath, $data, $dialport); - return (empty($data['RESULT'])) ? 'SOCKET_FAILED' : $data['RESULT']; - } -} diff --git a/workflow/engine/classes/PMLicensedFeatures.php b/workflow/engine/classes/PMLicensedFeatures.php deleted file mode 100644 index 93aa97e75..000000000 --- a/workflow/engine/classes/PMLicensedFeatures.php +++ /dev/null @@ -1,495 +0,0 @@ - array( - "description" => "Actions By Email allows users to enter information and route cases via email.", - "enabled" => false, - "id" => "actionsByEmail", - "latest_version" => "", - "log" => null, - "name" => "actionsByEmail", - "nick" => "actionsByEmail", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010004", - "type" => "features", - "url" => "", - "version" => "" - ), - 1 => array( - "description" => "Batch Routing allows a user to route multiple cases at a time onto the next task in the process. ", - "enabled" => false, - "id" => "pmConsolidatedCL", - "latest_version" => "", - "log" => null, - "name" => "pmConsolidatedCL", - "nick" => "pmConsolidatedCL", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010005", - "type" => "features", - "url" => "", - "version" => "" - ), - 2 => array( - "description" => "Dashboard with improved charting graphics and optimized to show strategic information like Process Efficiency and User Efficiency indicators.", - "enabled" => false, - "id" => "strategicDashboards", - "latest_version" => "", - "log" => null, - "name" => "strategicDashboards", - "nick" => "Strategic Dashboards", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010006", - "type" => "features", - "url" => "", - "version" => "" - ), - 3 => array( - "description" => "Enables the configuration of a second database connection in order to divide the database requests in read and write operations. This features is used with database clusters to improve the application performance.", - "enabled" => false, - "id" => "secondDatabaseConnection", - "latest_version" => "", - "log" => null, - "name" => "secondDatabaseConnection", - "nick" => "secondDatabaseConnection", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010000", - "type" => "features", - "url" => "", - "version" => "" - ), - 4 => array( - "description" => "Registers every administrator action in a log. Any change in the settings under the Admin menu is registered in the log.", - "enabled" => false, - "id" => "auditLog", - "latest_version" => "", - "log" => null, - "name" => "auditLog", - "nick" => "auditLog", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010001", - "type" => "features", - "url" => "", - "version" => "" - ), - 5 => array( - "description" => "A more secure option to store user passwords in ProcessMaker. The modern algorithm SHA-2 is used to store the passwords.", - "enabled" => false, - "id" => "secureUserPasswordHash", - "latest_version" => "", - "log" => null, - "name" => "secureUserPasswordHash", - "nick" => "secureUserPasswordHash", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010002", - "type" => "features", - "url" => "", - "version" => "" - ), - 6 => array( - "description" => "This features allows ProcessMaker to send out notifications using different email accounts and email servers.", - "enabled" => false, - "id" => "sendEmailFromDifferentEmailServers", - "latest_version" => "", - "log" => null, - "name" => "sendEmailFromDifferentEmailServers", - "nick" => "sendEmailFromDifferentEmailServers", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010003", - "type" => "features", - "url" => "", - "version" => "" - ), - 7 => array( - "description" => "Enables the code scanner feature.", - "enabled" => false, - "id" => "codeScanner", - "latest_version" => "", - "log" => null, - "name" => "codeScanner", - "nick" => "codeScanner", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010007", - "type" => "features", - "url" => "", - "version" => "" - ), - 8 => array( - "description" => "Enables the multiple email configuration feature.", - "enabled" => false, - "id" => "multipleEmailServers", - "latest_version" => "", - "log" => null, - "name" => "multipleEmailServers", - "nick" => "multipleEmailServers", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010009", - "type" => "features", - "url" => "", - "version" => "" - ), - 9 => array( - "description" => "Enables the mobile fields.", - "enabled" => false, - "id" => "mobileFields", - "latest_version" => "", - "log" => null, - "name" => "mobileFields", - "nick" => "mobileFields", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010008", - "type" => "features", - "url" => "", - "version" => "" - ), - 10 => array( - "description" => "This plugin will synchronize ProcessMaker with an LDAP or Active Directory server for user authentication.", - "enabled" => false, - "id" => "ldapAdvanced", - "latest_version" => "", - "log" => null, - "name" => "ldapAdvanced", - "nick" => "ldapAdvanced", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010010", - "type" => "features", - "url" => "", - "version" => "" - ), - 11 => array( - "description" => "SSO with an LDAP provider.", - "enabled" => false, - "id" => "windowsSSO", - "latest_version" => "", - "log" => null, - "name" => "windowsSSO", - "nick" => "windowsSSO", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010011", - "type" => "features", - "url" => "", - "version" => "" - ), - 12 => array( - "description" => "Integration with Gmail.", - "enabled" => false, - "id" => "pmGmail", - "latest_version" => "", - "log" => null, - "name" => "pmGmail", - "nick" => "pmGmail", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010012", - "type" => "features", - "url" => "", - "version" => "" - ), - 13 => array( - "description" => "User-based Language Management.", - "enabled" => false, - "id" => "userBasedLanguage", - "latest_version" => "", - "log" => null, - "name" => "userBasedLanguage", - "nick" => "userBasedLanguage", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010013", - "type" => "features", - "url" => "", - "version" => "" - ), - 14 => array( - "description" => "User-based Time Zone Management.", - "enabled" => false, - "id" => "userBasedTimeZone", - "latest_version" => "", - "log" => null, - "name" => "userBasedTimeZone", - "nick" => "userBasedTimeZone", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010014", - "type" => "features", - "url" => "", - "version" => "" - ), - 15 => array( - "description" => "This Feature will allow to store all input, output and attached documents generated - in your processes in Google Drive.", - "enabled" => false, - "id" => "pmGoogleDrive", - "latest_version" => "", - "log" => null, - "name" => "pmGoogleDrive", - "nick" => "pmGoogleDrive", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010015", - "type" => "features", - "url" => "", - "version" => "" - ), - 16 => array( - "description" => "Promotion Manager", - "enabled" => false, - "id" => "selectiveImportExport", - "latest_version" => "", - "log" => null, - "name" => "selectiveImportExport", - "nick" => "selectiveImportExport", - "progress" => 0, - "publisher" => "Colosa", - "release_type" => "localRegistry", - "status" => "ready", - "store" => "00000000000000000000000000010016", - "type" => "features", - "url" => "", - "version" => "" - ) - ); - - private static $instancefeature = null; - - /** - * This function is the constructor of the PMLicensedFeatures class - * param - * - * @return void - */ - public function __construct () - { - $criteria = new Criteria(); - $criteria->addAscendingOrderByColumn(AddonsManagerPeer::ADDON_ID); - $criteria->add(AddonsManagerPeer::ADDON_TYPE, 'feature', Criteria::EQUAL); - $addons = AddonsManagerPeer::doSelect($criteria); - foreach ($addons as $addon) { - $this->features[] = $addon->getAddonId(); - $detail = new FeaturesDetail($addon->getAddonNick(), $addon->getAddonDescription()); - $this->featuresDetails[$addon->getAddonId()] = $detail; - } - } - - /** - * This function is instancing to this class - * param - * - * @return object - */ - public static function getSingleton () - { - if (self::$instancefeature == null) { - self::$instancefeature = new PMLicensedFeatures(); - } - return self::$instancefeature; - } - - public function verifyfeature ($featureName) - { - $cached = Cache::get(PmLicenseManager::CACHE_KEY . '.' . config("system.workspace"), []); - if (isset($cached[$featureName])) { - return $cached[$featureName]; - } - - $licenseManager = PmLicenseManager::getSingleton(false); - - $_SESSION['__sw__'] = true; - $padl = new Padl(); - $value = $padl->_decrypt($featureName); - - if (is_array($value)) { - $value = $value[0]; - } - $trueValue = $value; - $enable = in_array($trueValue, $licenseManager->licensedfeatures); - - if (!isset($this->featuresDetails[$value[0]]) || !is_object($this->featuresDetails[$value[0]])) { - $this->featuresDetails[$value[0]] = new stdclass(); - } - $this->featuresDetails[$value[0]]->enabled = $enable; - - $cached[$featureName] = $enable; - Cache::put(PmLicenseManager::CACHE_KEY . '.' . config("system.workspace"), $cached, Carbon::now()->addDay(1)); - - return $enable; - } - - public function addNewFeatures ($data) - { - $newFeaturesList = $this->newFeatures; - $newData = array(); - $newFeaturesIds = array(); - foreach($newFeaturesList as $val) { - $newFeaturesIds[] = $val['id']; - } - $criteria = new Criteria(); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_ID); - $criteria->add(AddonsManagerPeer::ADDON_ID, $newFeaturesIds, Criteria::IN); - $criteria->add(AddonsManagerPeer::ADDON_TYPE, 'features'); - $rs = AddonsManagerPeer::doSelectRS($criteria); - $rs->next(); - $row = $rs->getRow(); - $ids = array(); - if(sizeof($row)) { - while (is_array($row)) { - $ids[] = $row[0]; - $rs->next(); - $row = $rs->getRow(); - } - $toUpdate = array_diff($newFeaturesIds,$ids); - - if(sizeof($toUpdate)){ - $newFeaturesListAux = array(); - foreach($toUpdate as $index => $v) { - $newFeaturesListAux[] = $newFeaturesList[$index]; - } - unset($newFeaturesList); - $newFeaturesList = array_values($newFeaturesListAux); - } else { - return $data; - } - } - - $i = 0; - foreach($newFeaturesList as $k => $newFeature){ - $newData[] = array ( - 'db' => 'wf', - 'table' => 'ADDONS_MANAGER', - 'keys' => - array ( - 0 => 'ADDON_ID', - ), - 'data' => - array ( - 0 => - array ( - 'field' => 'ADDON_DESCRIPTION', - 'type' => 'text', - 'value' => $newFeature['description'], - ), - 1 => - array ( - 'field' => 'ADDON_ID', - 'type' => 'text', - 'value' => $newFeature['id'], - ), - 2 => - array ( - 'field' => 'ADDON_NAME', - 'type' => 'text', - 'value' => $newFeature['name'], - ), - 3 => - array ( - 'field' => 'ADDON_NICK', - 'type' => 'text', - 'value' => $newFeature['nick'], - ), - 4 => - array ( - 'field' => 'ADDON_PUBLISHER', - 'type' => 'text', - 'value' => $newFeature['publisher'], - ), - 5 => - array ( - 'field' => 'ADDON_RELEASE_TYPE', - 'type' => 'text', - 'value' => $newFeature['release_type'], - ), - 6 => - array ( - 'field' => 'ADDON_STATUS', - 'type' => 'text', - 'value' => $newFeature['status'], - ), - 7 => - array ( - 'field' => 'STORE_ID', - 'type' => 'text', - 'value' => $newFeature['store'], - ), - 8 => - array ( - 'field' => 'ADDON_TYPE', - 'type' => 'text', - 'value' => $newFeature['type'], - ), - 9 => - array ( - 'field' => 'ADDON_DOWNLOAD_URL', - 'type' => 'text', - 'value' => $newFeature['url'], - ), - 10 => - array ( - 'field' => 'ADDON_VERSION', - 'type' => 'text', - 'value' => $newFeature['version'], - ), - 11 => - array ( - 'field' => 'ADDON_DOWNLOAD_PROGRESS', - 'type' => 'text', - 'value' => $newFeature['progress'], - ) - ), - 'action' => 1, - ); - - $i++; - } - return array_merge($data, $newData); - } -} diff --git a/workflow/engine/classes/PMPluginRegistry.php b/workflow/engine/classes/PMPluginRegistry.php index 0384c9180..8914c2106 100644 --- a/workflow/engine/classes/PMPluginRegistry.php +++ b/workflow/engine/classes/PMPluginRegistry.php @@ -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 diff --git a/workflow/engine/classes/Padl.php b/workflow/engine/classes/Padl.php deleted file mode 100644 index 5c18ea9ac..000000000 --- a/workflow/engine/classes/Padl.php +++ /dev/null @@ -1,706 +0,0 @@ - - * @version 0.1 - * @history--------------------------------------------- - * see CHANGELOG - */ - -use ProcessMaker\Core\System; - -/** - * Project: Distrubution License Class - * File: class.license.lib.php - * - * Copyright (C) 2005 Oliver Lillie - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * @link http://www.buggedcom.co.uk/ - * @link http://www.phpclasses.org/browse/package/2298.html - * @author Oliver Lillie, buggedcom - * @version 0.1 - * @history--------------------------------------------- - * see CHANGELOG - */ -class Padl -{ - /** - * hash key 1 used to encrypt the generate key data. - * hash key 2 used to encrypt the request data - * hash key 3 used to encrypt the dial home data - * NOTE1 : there are three different hash keys for the three different operations - * NOTE2 : these hash key's are for use by both mcrypt and alternate cryptions - * and although mcrypts keys are typically short they should be kept long - * for the sake of the other functions - * - * @var string - * @var string - * @var string - */ - public $HASH_KEY1 = 'YmUzYWM2sNGU24NbA363zA7IDSDFGDFGB5aVi35BDFGQ3YNO36ycDFGAATq4sYmSFVDFGDFGps7XDYEzGDDw96OnMW3kjCFJ7M+UV2kHe1WTTEcM09UMHHT'; - public $HASH_KEY2 = '80dSbqylf4Cu5e5OYdAoAVkzpRDWAt7J1Vp27sYDU52ZBJprdRL1KE0il8KQXuKCK3sdA51P9w8U60wohX2gdmBu7uVhjxbS8g4y874Ht8L12W54Q6T4R4a'; - public $HASH_KEY3 = 'ant9pbc3OK28Li36Mi4d3fsWJ4tQSN4a9Z2qa8W66qR7ctFbljsOc9J4wa2Bh6j8KB3vbEXB18i6gfbE0yHS0ZXQCceIlG7jwzDmN7YT06mVwcM9z0vy62T'; - /** - * You may not want to use mcrypt even if your system has it installed - * make this false to use a regular encryption method - * - * @var boolean - */ - public $USE_MCRYPT = true; - /** - * The algorythm to be used by mcrypt - * - * @var string - */ - public $ALGORITHM = 'blowfish'; - /** - * use time binding vars inited. - */ - public $USE_TIME; - /** - * time checking start period difference allowance ie if the user has slightly different time - * setting on their server make an allowance for the diff period. carefull to not make it too - * much otherwise they could just reset their server to a time period before the license expires. - * - * @var number (seconds) - */ - public $START_DIF = 129600; - /** - * id 1 used to validate license keys - * id 2 used to validate license key requests - * id 2 used to validate dial home data - * - * @var string - * @var string - * @var string - */ - # id to check for to validate source - public $ID1 = 'nSpkAHRiFfM2hE588eB'; - public $ID2 = 'NWCy0s0JpGubCVKlkkK'; - public $ID3 = 'G95ZP2uS782cFey9x5A'; - /** - * begining and end strings - * - * @var strings - */ - public $BEGIN1 = 'BEGIN LICENSE KEY'; - public $END1 = 'END LICENSE KEY'; - /** - * wrap key settings - * - * @var number - * @var string - * @var string - */ - public $_WRAPTO = 80; - public $_PAD = "-"; - /** - * init the linebreak var - */ - public $_LINEBREAK; - /** - * dial home return query deliminators - * - * @var string - * @var string - */ - public $BEGIN2 = '_DATA{'; - public $END2 = '}DATA_'; - /** - * init the key data array. - * - * @var array - */ - public $_DATA = array(); - /** - * use server binding vars inited. - */ - public $USE_SERVER; - public $_SERV; - public $_MAC; - public $ALLOW_LOCAL; - public $_SERVER_INFO = array(); - /** - * this is the number of required server stats for the key generation to be successfull - * if the server can't produce this number of details then the key fails to be generated - * you can set it to however many you wish, the max is 5 - * - * @var number - */ - public $REQUIRED_URIS = 2; - /** - * the date string for human readable format - * - * @var string - */ - public $DATE_STRING = 'M/d/Y H:i:s'; - - /** - * Constructor - * - * @access private - * */ - public function __construct() - { - # check to see if the class has been secured - $this->_check_secure(); - } - - /** - * init - * - * init the license class - * - * @access public - * @param $use_mcrypt boolean Determines if mcrypt encryption is used or not (defaults to true, - * however if mcrypt is not available, it is set to false) - * @param $use_time boolean Sets if time binding should be used in the key (defaults to true) - * @param $use_server boolean Sets if server binding should be used in the key (defaults to true) - * @param $allow_local boolean Sets if server binding is in use then localhost servers are valid (defaults to false) - * */ - public function init($use_mcrypt = true, $use_time = true, $use_server = true, $allow_local = false, $challenge = false) - { - # check to see if the class has been secured - if (!$challenge) { - $this->_check_secure(); - } - $this->USE_MCRYPT = ($use_mcrypt && function_exists('mcrypt_generic')); - $this->USE_TIME = $use_time; - $this->ALLOW_LOCAL = $allow_local; - $this->USE_SERVER = $use_server; - $this->_LINEBREAK = $this->_get_os_linebreak(); - } - - /** - * _get_os_linebreak - * - * get's the os linebreak - * - * @access private - * @param $true_val boolean If the true value is needed for writing files, make true - * defaults to false - * @return string Returns the os linebreak - * */ - public function _get_os_linebreak($true_val = false) - { - $os = strtolower(PHP_OS); - switch ($os) { - # not sure if the string is correct for FreeBSD - # not tested - case 'freebsd': - # not sure if the string is correct for NetBSD - # not tested - case 'netbsd': - # not sure if the string is correct for Solaris - # not tested - case 'solaris': - # not sure if the string is correct for SunOS - # not tested - case 'sunos': - # linux variation - # tested on server - case 'linux': - $nl = "\n"; - break; - # darwin is mac os x - # tested only on the client os - case 'darwin': - # note os x has \r line returns however it appears that the ifcofig - # file used to source much data uses \n. let me know if this is - # just my setup and i will attempt to fix. - if ($true_val) { - $nl = "\r"; - } else { - $nl = "\n"; - } - break; - # defaults to a win system format; - default: - $nl = "\r\n"; - } - return $nl; - } - - public function do_post_request($url, $data, $optional_headers = null) - { - $params = array('http' => array( - 'method' => 'POST', - 'content' => $data - )); - if ($optional_headers !== null) { - $params['http']['header'] = $optional_headers; - } - - // Proxy settings - $sysConf = System::getSystemConfiguration(); - if ($sysConf['proxy_host'] != '') { - if (!is_array($params['http'])) { - $params['http'] = array(); - } - $params['http']['request_fulluri'] = true; - $params['http']['proxy'] = 'tcp://' . $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''); - if ($sysConf['proxy_user'] != '') { - if (!isset($params['http']['header'])) { - $params['http']['header'] = ''; - } - $params['http']['header'] .= 'Proxy-Authorization: Basic ' . base64_encode($sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : '')); - } - } - - $ctx = stream_context_create($params); - //G::pr($ctx); - $fp = @fopen($url, 'rb', false, $ctx); - //G::pr($fp); - if (!$fp) { - throw new Exception("Problem with $url, $php_errormsg"); - } - $response = @stream_get_contents($fp); - if ($response === false) { - throw new Exception("Problem reading data from $url, $php_errormsg"); - } - return $response; - } - - /** - * _post_data - * - * Posts data to and recieves data from dial home server. Returned info - * contains the dial home validation result - * - * @access private - * @param $host string Host name of the server to be contacted - * @param $path string Path of the script for the data to be sent to - * @param $query_array array Array that contains the license key info to be validated - * @param $port number Port Number to send the data through - * @return array Result of the dialhome validation - * @return string - SOCKET_FAILED will be returned if it was not possible to open a socket to the home server - * */ - public function _post_data($host, $path, $query_array, $port = 80) - { - # generate the post query info - $query = 'POSTDATA=' . $this->_encrypt($query_array, 'HOMEKEY'); - $query .= '&MCRYPT=' . $this->USE_MCRYPT; - $query .= '&TYPE=' . $query_array['DATA']['TYPE']; - $query .= '&PLAN=' . $query_array['DATA']['PLAN']; - //G::pr($path); - //G::pr($query); - # init the return string - //$return = ''; - //$return=$this->do_post_request($host.$path, $query); - # separate out the data using the delims - //$leftpos = strpos($return, $this->BEGIN2)+strlen($this->BEGIN2); - //$rightpos = strpos($return, $this->END2)-$leftpos; - # decrypt and return the data - //return $this->_decrypt(substr($return, $leftpos, $rightpos), 'HOMEKEY'); - //die; - # generate the post headers - $post = "POST $path HTTP/1.1\r\n"; - $post .= "Host: $host\r\n"; - $post .= "Content-type: application/x-www-form-urlencoded\r\n"; - $post .= "Content-length: " . strlen($query) . "\r\n"; - $post .= "Connection: close\r\n"; - $post .= "\r\n"; - $post .= $query; - - # open a socket - $ip = gethostbyname($host); - if ($ip == $host) { - $ip = rtrim(`/usr/bin/dig $host A +short | /usr/bin/tail -1`); - } - $header = @fsockopen($ip, $port); - //print "fsockopen($host, $port)"; - //G::pr($header); - if (!$header) { - # if the socket fails return failed - return array('RESULT' => 'SOCKET_FAILED'); - } - @fputs($header, $post); - //G::pr($post); - # read the returned data - while (!@feof($header)) { - $return .= @ fgets($header, 1024); - } - fclose($header); - - # separate out the data using the delims - $leftpos = strpos($return, $this->BEGIN2) + strlen($this->BEGIN2); - $rightpos = strpos($return, $this->END2) - $leftpos; - - #trace($return); - # decrypt and return the data - return $this->_decrypt(substr($return, $leftpos, $rightpos), 'HOMEKEY'); - } - - /** - * _compare_domain_ip - * - * uses the supplied domain in the key and runs a check against the collected - * ip addresses. If there are matching ips it returns true as the domain - * and ip address match up - * - * @access private - * @return boolean - * */ - public function _compare_domain_ip($domain, $ips = false) - { - # if no ips are supplied get the ip addresses for the server - if (!$ips) { - $ips = $this->_get_ip_address(); - } - # get the domain ip list - $domain_ips = gethostbynamel($domain); - # loop through the collected ip's searching for matches against the domain ips - if (is_array($domain_ips) && count($domain_ips) > 0) { - foreach ($domain_ips as $ip) { - if (in_array($ip, $ips)) { - return true; - } - } - } - return false; - } - - /** - * _pad - * - * pad out the begin and end seperators - * - * @access private - * @param $str string The string to be padded - * @return string Returns the padded string - * */ - public function _pad($str) - { - $str_len = strlen($str); - $spaces = ($this->_WRAPTO - $str_len) / 2; - $str1 = ''; - for ($i = 0; $i < $spaces; $i++) { - $str1 = $str1 . $this->_PAD; - } - if ($spaces / 2 != round($spaces / 2)) { - $str = substr($str1, 0, strlen($str1) - 1) . $str; - } else { - $str = $str1 . $str; - } - $str = $str . $str1; - return $str; - } - - /** - * _get_key - * - * gets the hash key for the current encryption - * - * @access private - * @param $key_type string The license key type being produced - * @return string Returns the hash key - * */ - public function _get_key($key_type) - { - switch ($key_type) { - case 'KEY': - return $this->HASH_KEY1; - case 'REQUESTKEY': - return $this->HASH_KEY2; - case 'HOMEKEY': - return $this->HASH_KEY3; - default: - } - } - - /** - * _get_begin - * - * gets the begining license key seperator text - * - * @access private - * @param $key_type string The license key type being produced - * @return string Returns the begining string - * */ - public function _get_begin($key_type) - { - switch ($key_type) { - case 'KEY': - return $this->BEGIN1; - case 'REQUESTKEY': - return $this->BEGIN2; - case 'HOMEKEY': - return ''; - } - } - - /** - * _get_end - * - * gets the ending license key seperator text - * - * @access private - * @param $key_type string The license key type being produced - * @return string Returns the ending string - * */ - public function _get_end($key_type) - { - switch ($key_type) { - case 'KEY': - return $this->END1; - case 'REQUESTKEY': - return $this->_END2; - case 'HOMEKEY': - return ''; - } - } - - /** - * _generate_random_string - * - * generates a random string - * - * @access private - * @param $length number The length of the random string - * @param $seeds string The string to pluck the characters from - * @return string Returns random string - * */ - public function _generate_random_string($length = 10, $seeds = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890123456789') - { - $str = ''; - $seeds_count = strlen($seeds); - - list($usec, $sec) = explode(' ', microtime()); - $seed = (float) $sec + ((float) $usec * 100000); - mt_srand($seed); - - for ($i = 0; $length > $i; $i++) { - $str .= $seeds[mt_rand(0, $seeds_count - 1)]; - } - return $str; - } - - /** - * _encrypt - * - * encrypts the key - * - * @access private - * @param $src_array array The data array that contains the key data - * @return string Returns the encrypted string - * */ - public function _encrypt($src_array, $key_type = 'KEY') - { - # check to see if the class has been secured - $this->_check_secure(); - - $rand_add_on = $this->_generate_random_string(3); - # get the key - $key = $this->_get_key($key_type); - $key = $rand_add_on . $key; - - # check to see if mycrypt exists - if ($this->USE_MCRYPT) { - # openup mcrypt - $td = @mcrypt_module_open($this->ALGORITHM, '', 'ecb', ''); - $iv = @mcrypt_create_iv(@mcrypt_enc_get_iv_size($td), MCRYPT_RAND); - # process the key - $key = substr($key, 0, @mcrypt_enc_get_key_size($td)); - # init mcrypt - @mcrypt_generic_init($td, $key, $iv); - - # encrypt data - # double base64 gets makes all the characters alpha numeric - # and gets rig of the special characters - $crypt = @mcrypt_generic($td, serialize($src_array)); - - # shutdown mcrypt - @mcrypt_generic_deinit($td); - @mcrypt_module_close($td); - } else { - # if mcrypt doesn't exist use regular encryption method - # init the vars - $crypt = ''; - $str = serialize($src_array); - - # loop through the str and encrypt it - for ($i = 1; $i <= strlen($str); $i++) { - $char = substr($str, $i - 1, 1); - $keychar = substr($key, ($i % strlen($key)) - 1, 1); - $char = chr(ord($char) + ord($keychar)); - $crypt .= $char; - } - } - # return the key - return $rand_add_on . base64_encode(base64_encode(trim($crypt))); - } - - /** - * _decrypt - * - * decrypts the key - * - * @access private - * @param $enc_string string The key string that contains the data - * @return array Returns decrypted array - * */ - public function _decrypt($str, $key_type = 'KEY') - { - # check to see if the class has been secured - $this->_check_secure(); - - $rand_add_on = substr($str, 0, 3); - $str = base64_decode(base64_decode(substr($str, 3))); - # get the key - $key = $rand_add_on . $this->_get_key($key_type); - - # check to see if mycrypt exists - if ($this->USE_MCRYPT) { - # openup mcrypt - $td = @mcrypt_module_open($this->ALGORITHM, '', 'ecb', ''); - $iv = @mcrypt_create_iv(@mcrypt_enc_get_iv_size($td), MCRYPT_RAND); - # process the key - $key = substr($key, 0, @mcrypt_enc_get_key_size($td)); - # init mcrypt - @mcrypt_generic_init($td, $key, $iv); - - # decrypt the data and return - $decrypt = @mdecrypt_generic($td, $str); - - # shutdown mcrypt - @mcrypt_generic_deinit($td); - @mcrypt_module_close($td); - } else { - # if mcrypt doesn't exist use regular decryption method - # init the decrypt vars - $decrypt = ''; - - # loop through the text and decode the string - for ($i = 1; $i <= strlen($str); $i++) { - $char = substr($str, $i - 1, 1); - $keychar = substr($key, ($i % strlen($key)) - 1, 1); - $char = chr(ord($char) - ord($keychar)); - $decrypt .= $char; - } - } - $decrypt = trim($decrypt); - # return the key - return unserialize($decrypt); - } - - /** - * _wrap_license - * - * wraps up the license key in a nice little package - * - * @access private - * @param $src_array array The array that needs to be turned into a license str - * @param $key_type string The type of key to be wrapped (KEY=license key, REQUESTKEY=license request key) - * @return string Returns encrypted and formatted license key - * */ - public function _wrap_license($src_array, $key_type = 'KEY') - { - # sort the variables - $begin = $this->_pad($this->_get_begin($key_type)); - $end = $this->_pad($this->_get_end($key_type)); - - # encrypt the data - $str = $this->_encrypt($src_array, $key_type); - - # return the wrap - return $begin . $this->_LINEBREAK . wordwrap($str, $this->_WRAPTO, $this->_LINEBREAK, 1) . $this->_LINEBREAK . $end; - } - - /** - * _unwrap_license - * - * unwraps license key back into it's data array - * - * @access private - * @param $enc_str string The encrypted license key string that needs to be decrypted - * @param $key_type string The type of key to be unwrapped (KEY=license key, REQUESTKEY=license request key) - * @return array Returns license data array - * */ - public function _unwrap_license($enc_str, $key_type = 'KEY') - { - # sort the variables - $begin = $this->_pad($this->_get_begin($key_type)); - $end = $this->_pad($this->_get_end($key_type)); - - # get string without seperators - $str = trim(str_replace(array($begin, $end, "\r", "\n", "\t"), '', $enc_str)); - - # decrypt and return the key - return $this->_decrypt($str, $key_type); - } - - /** - * make_secure - * - * deletes all class values to prevent re-writing of a key; - * - * @access public - * */ - public function make_secure($report = false) - { - if ($report) { - define('_PADL_REPORT_ABUSE_', true); - } - # walkthrough and delete the class vars - foreach (array_keys(get_object_vars($this)) as $value) { - unset($this->$value); - } - # define that class is secure - define('_PADL_SECURE_', 1); - } - - /** - * _check_secure - * - * checks to see if the class has been made secure - * - * @access private - * */ - public function _check_secure() - { - if (!isset($_SESSION['__sw__'])) { - # check to see if padl has been made secure - if (defined('_PADL_SECURE_')) { - # if(defined('_PADL_REPORT_ABUSE_')) $this->_post_data($this->_HOST, $this->_PATH, array()); - # trigger the error because user has attempted to access secured functions - # after the call has been made to 'make_secure' - trigger_error("

The PHP Application Distribution License System (PADL) has been made secure.
You have attempted to use functions that have been protected and this has terminated your script.

", E_USER_ERROR); - exit; - } - } - } -} diff --git a/workflow/engine/classes/PmDynaform.php b/workflow/engine/classes/PmDynaform.php index a217ba7b1..9e19723de 100644 --- a/workflow/engine/classes/PmDynaform.php +++ b/workflow/engine/classes/PmDynaform.php @@ -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() diff --git a/workflow/engine/classes/PmGoogleApi.php b/workflow/engine/classes/PmGoogleApi.php index de2bcb49a..40f625e29 100644 --- a/workflow/engine/classes/PmGoogleApi.php +++ b/workflow/engine/classes/PmGoogleApi.php @@ -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; } diff --git a/workflow/engine/classes/PmLicenseManager.php b/workflow/engine/classes/PmLicenseManager.php deleted file mode 100644 index e6d891dfe..000000000 --- a/workflow/engine/classes/PmLicenseManager.php +++ /dev/null @@ -1,532 +0,0 @@ -getProperty('LOGIN_NO_WS') === null || $oServerConf->getProperty('LOGIN_NO_WS') === false) { - $oServerConf->setProperty('LOGIN_NO_WS', true); - } - - //searching .dat files in workspace folder - $server_array = $_SERVER; - - $activeLicenseSetting = $oServerConf->getProperty('ACTIVE_LICENSE'); - - if ((isset($activeLicenseSetting[config("system.workspace")])) && (file_exists($activeLicenseSetting[config("system.workspace")]))) { - $licenseFile = $activeLicenseSetting[config("system.workspace")]; - } else { - $activeLicense = $this->getActiveLicense(); - $oServerConf->setProperty('ACTIVE_LICENSE', [config("system.workspace") => isset($activeLicense['LICENSE_PATH']) ? $activeLicense['LICENSE_PATH'] : null]); - $licenseFile = isset($activeLicense['LICENSE_PATH']) ? $activeLicense['LICENSE_PATH'] : null; - } - - $application = new license_application($licenseFile, false, true, false, true); - $application->set_server_vars($server_array); - $application->DATE_STRING = 'Y-m-d H:i:s'; - $results = $application->validate(); - $validStatus = [ - 'OK', - 'EXPIRED', - 'TMINUS' - ]; - - $this->result = $results['RESULT']; - $this->features = []; - $this->licensedfeatures = []; - $this->licensedfeaturesList = []; - if (in_array($this->result, $validStatus)) { - $this->serial = "3ptta7Xko2prrptrZnSd356aqmPXvMrayNPFj6CLdaR1pWtrW6qPw9jV0OHjxrDGu8LVxtmSm9nP5kR23HRpdZWccpeui+bKkK°DoqCt2Kqgpq6Vg37s"; - $info = []; - $info['FIRST_NAME'] = $results['DATA']['FIRST_NAME']; - $info['LAST_NAME'] = $results['DATA']['LAST_NAME']; - $info['DOMAIN_WORKSPACE'] = $results['DATA']['DOMAIN_WORKSPACE']; - $this->date = $results ['DATE']; - $this->info = $info; - $this->type = $results ['DATA']['TYPE']; - $this->plan = isset($results ['DATA']['PLAN']) ? $results ['DATA']['PLAN'] : ""; - $this->id = $results ['ID']; - $this->expireIn = $this->getExpireIn(); - $this->features = $this->result != 'TMINUS' ? isset($results ['DATA']['CUSTOMER_PLUGIN']) ? $results ['DATA']['CUSTOMER_PLUGIN'] : $this->getActiveFeatures() : []; - $this->licensedfeatures = $this->result != 'TMINUS' ? (isset($results ['DATA']['CUSTOMER_LICENSED_FEATURES']) && is_array($results ['DATA']['CUSTOMER_LICENSED_FEATURES'])) ? $results ['DATA']['CUSTOMER_LICENSED_FEATURES'] : [] : []; - $this->licensedfeaturesList = isset($results ['DATA']['LICENSED_FEATURES_LIST']) ? $results ['DATA']['LICENSED_FEATURES_LIST'] : null; - $this->status = $this->getCurrentLicenseStatus(); - - if (isset($results ['LIC'])) { - $resultsRegister = $results['LIC']; - $this->server = $results['LIC']['SRV']; - $this->file = $results['LIC']['FILE']; - $this->workspace = isset($results['LIC']['WORKSPACE']) ? $results['LIC']['WORKSPACE'] : 'pmLicenseSrv'; - $this->licenseSerial = (isset($results['LIC']['SERIAL'])) ? $results['LIC']['SERIAL'] : ''; - $this->supportStartDate = (isset($results['DATA']['SUPPORT_START_DATE'])) ? $results['DATA']['SUPPORT_START_DATE'] : ''; - $this->supportEndDate = (isset($results['DATA']['SUPPORT_END_DATE'])) ? $results['DATA']['SUPPORT_END_DATE'] : ''; - $this->supportStartDate = date("Y-m-d H:i:s", strtotime($this->supportStartDate)); - $this->supportEndDate = date("Y-m-d H:i:s", strtotime($this->supportEndDate)); - - $conf = new Configurations(); - if (!empty(config("system.workspace")) && $conf->exists("ENVIRONMENT_SETTINGS")) { - $this->supportStartDate = $conf->getSystemDate($this->supportStartDate); - $this->supportEndDate = $conf->getSystemDate($this->supportEndDate); - } else { - $this->supportStartDate = G::getformatedDate($this->supportStartDate, 'M d, yyyy', SYS_LANG); - $this->supportEndDate = G::getformatedDate($this->supportEndDate, 'M d, yyyy', SYS_LANG); - } - } else { - $resultsRegister = []; - $resultsRegister['ID'] = $results['DATA']['DOMAIN_WORKSPACE']; - $this->server = null; - $this->file = null; - } - - // The HUMAN attribute varies according to the timezone configured in the server, therefore it does not need - // to be considered in the comparison if the value was changed or not, it is only comparing with te "timestamp" - if (isset($results['DATE']['HUMAN'])) { - unset($results['DATE']['HUMAN']); - } - $resultsRegister['date'] = $results ['DATE']; - $resultsRegister['info'] = $info; - $resultsRegister['type'] = $results ['DATA'] ['TYPE']; - if ($oServerConf->getProperty('LICENSE_INFO')) { - $licInfoA = $oServerConf->getProperty('LICENSE_INFO'); - // The HUMAN attribute varies according to the timezone configured in the server, therefore it does not need - // to be considered in the comparison if the value was changed or not, it is only comparing with te "timestamp" - if (isset($licInfoA[config("system.workspace")]['date']['HUMAN'])) { - unset($licInfoA[config("system.workspace")]['date']['HUMAN']); - } - } else { - $licInfoA = []; - } - if (empty($licInfoA[config("system.workspace")]) || ($licInfoA[config("system.workspace")] != $resultsRegister)) { - $licInfoA[config("system.workspace")] = $resultsRegister; - $oServerConf->setProperty('LICENSE_INFO', $licInfoA); - } - } - - if ($flagActivatePlugins) { - $this->activateFeatures(); - } - } - - public static function getSingleton($flagActivatePlugins = true) - { - if (self::$instance == null) { - self::$instance = new PmLicenseManager($flagActivatePlugins); - } - return self::$instance; - } - - public function serializeInstance() - { - return serialize(self::$instance); - } - - public function activateFeatures() - { - //Get a list of all Enterprise plugins and active/inactive them - if (file_exists(PATH_PLUGINS . 'enterprise/data/default')) { - if ($this->result == "OK") { - //Disable - if (file_exists(PATH_PLUGINS . 'enterprise/data/data')) { - $oPluginRegistry = PluginRegistry::loadSingleton(); - $aPlugins = unserialize(trim(file_get_contents(PATH_PLUGINS . 'enterprise/data/data'))); - foreach ($aPlugins as $aPlugin) { - $sClassName = substr($aPlugin ['sFilename'], 0, strpos($aPlugin ['sFilename'], '-')); - require_once PATH_PLUGINS . $sClassName . '.php'; - $oDetails = $oPluginRegistry->getPluginDetails($sClassName . '.php'); - $oPluginRegistry->disablePlugin($oDetails->getNamespace()); - $oPluginRegistry->savePlugin($oDetails->getNamespace()); - } - unlink(PATH_PLUGINS . 'enterprise/data/data'); - } - - //Enable - $oPluginRegistry = PluginRegistry::loadSingleton(); - $aPlugins = unserialize(trim(file_get_contents(PATH_PLUGINS . "enterprise/data/default"))); - - foreach ($aPlugins as $aPlugin) { - if ($aPlugin ["bActive"]) { - $sClassName = substr($aPlugin["sFilename"], 0, strpos($aPlugin["sFilename"], "-")); - require_once(PATH_PLUGINS . $sClassName . ".php"); - $oDetails = $oPluginRegistry->getPluginDetails($sClassName . ".php"); - $oPluginRegistry->enablePlugin($oDetails->getNamespace()); - $oPluginRegistry->savePlugin($oDetails->getNamespace()); - } - } - - $eeData = Cache::get(config('system.workspace') . 'enterprise.ee', function () { - if (file_exists(PATH_DATA_SITE . 'ee')) { - return trim(file_get_contents(PATH_DATA_SITE . 'ee')); - } - return null; - }); - if ($eeData) { - $aPlugins = unserialize($eeData); - $aDenied = []; - foreach ($aPlugins as $aPlugin) { - $sClassName = substr($aPlugin ['sFilename'], 0, strpos($aPlugin ['sFilename'], '-')); - if (!(in_array($sClassName, $this->features))) { - if (file_exists(PATH_PLUGINS . $sClassName . '.php')) { - require_once PATH_PLUGINS . $sClassName . '.php'; - $oDetails = $oPluginRegistry->getPluginDetails($sClassName . '.php'); - $oPluginRegistry->disablePlugin($oDetails->getNamespace()); - $oPluginRegistry->savePlugin($oDetails->getNamespace()); - $aDenied[] = $oDetails->getNamespace(); - } - } - } - if (!(empty($aDenied))) { - if ((SYS_COLLECTION == "enterprise") && (SYS_TARGET == "pluginsList")) { - G::SendMessageText("The following plugins were restricted due to your enterprise license: " . implode( - ", ", - $aDenied - ), "INFO"); - } - } - } - } else { - //Disable - $oPluginRegistry = PluginRegistry::loadSingleton(); - $aPlugins = unserialize(trim(file_get_contents(PATH_PLUGINS . 'enterprise/data/default'))); - foreach ($aPlugins as $aPlugin) { - $sClassName = substr($aPlugin ['sFilename'], 0, strpos($aPlugin ['sFilename'], '-')); - //To avoid self disable - if (($sClassName != "pmLicenseManager") && ($sClassName != "pmTrial") && ($sClassName != "enterprise")) { - require_once PATH_PLUGINS . $sClassName . '.php'; - $oDetails = $oPluginRegistry->getPluginDetails($sClassName . '.php'); - $oPluginRegistry->disablePlugin($oDetails->getNamespace()); - } else { - //Enable default and required plugins - require_once PATH_PLUGINS . $sClassName . '.php'; - $oDetails = $oPluginRegistry->getPluginDetails($sClassName . '.php'); - $oPluginRegistry->enablePlugin($oDetails->getNamespace()); - } - $oPluginRegistry->savePlugin($oDetails->getNamespace()); - } - - $eeData = Cache::get(config('system.workspace') . 'enterprise.ee', function () { - if (file_exists(PATH_DATA_SITE . 'ee')) { - return trim(file_get_contents(PATH_DATA_SITE . 'ee')); - } - return null; - }); - if ($eeData) { - $aPlugins = unserialize($eeData); - - foreach ($aPlugins as $aPlugin) { - $sClassName = substr($aPlugin ['sFilename'], 0, strpos($aPlugin ['sFilename'], '-')); - if (strlen($sClassName) > 0) { - if (!class_exists($sClassName)) { - require_once PATH_PLUGINS . $sClassName . '.php'; - } - $oDetails = $oPluginRegistry->getPluginDetails($sClassName . '.php'); - if ($oDetails) { - $oPluginRegistry->disablePlugin($oDetails->getNamespace()); - $oPluginRegistry->savePlugin($oDetails->getNamespace()); - } - } - } - } - } - } - } - - public function getCurrentLicenseStatus() - { - $result = []; - switch ($this->result) { - case 'OK': - $result ['result'] = 'ok'; - $result ['message'] = ""; - break; - case 'TMINUS': - $result ['result'] = 'tminus'; - $startDateA = explode(" ", $this->date['HUMAN']['START']); - $result ['message'] = "License will be active on " . $startDateA[0]; - break; - case 'EXPIRED': - $result ['result'] = 'expired'; - $result ['message'] = "License Expired"; - break; - case 'ILLEGAL': - $result ['result'] = 'illegal'; - $result ['message'] = "Illegal License"; - break; - case 'ILLEGAL_LOCAL': - $result ['result'] = 'illegal'; - $result ['message'] = "Illegal Local License"; - break; - case 'INVALID': - $result ['result'] = 'invalid'; - $result ['message'] = "Invalid License"; - break; - case 'EMPTY': - $result ['result'] = 'empty'; - $result ['message'] = "Empty License"; - if (defined('write_error')) { - $result ['message'] = "Write error" . $result ['message']; - } - break; - default: - break; - } - return $result; - } - - public function unSerializeInstance($serialized) - { - if (self::$instance == null) { - self::$instance = new PluginRegistry(); - } - $instance = unserialize($serialized); - self::$instance = $instance; - } - - public function getExpireIn() - { - $status = $this->getCurrentLicenseStatus(); - $expireIn = 0; - if ($status ['result'] == 'ok') { - if ($this->date ['END'] != "NEVER") { - $expireIn = ceil(($this->date ['END'] - time()) / 60 / 60 / 24); - } else { - $expireIn = "NEVER"; - } - } - return $expireIn; - } - - public function getLicenseInfo() - { - $validStatus = [ - 'ok', - 'expired' - ]; - $status = $this->getCurrentLicenseStatus(); - $infoText = ""; - if (in_array($status ['result'], $validStatus)) { - $start = explode(" ", $this->date ['HUMAN'] ['START']); - $end = explode(" ", $this->date ['HUMAN'] ['END']); - $infoText .= "" . "Issued to" . ": " . $this->info ['FIRST_NAME'] . " " . $this->info ['LAST_NAME'] . "
"; - $infoText .= "" . G::LoadTranslation('ID_WORKSPACE') . ": " . $this->info ['DOMAIN_WORKSPACE'] . "
"; - $infoText .= "" . G::LoadTranslation('ID_VALID_FROM') . " " . $start [0] . " " . G::LoadTranslation('ID_TO') . " " . $end [0] . ""; - } - if ($status ['message'] != "") { - $infoText .= " - " . $status ['message'] . ""; - } - $info ['infoText'] = $infoText; - $info ['infoLabel'] = $status ['message']; - return $info; - } - - public function getExpireInLabel() - { - $linkText = null; - - if ($this->getExpireIn() != "NEVER" && ((int)$this->getExpireIn() <= 30) && ((int)$this->getExpireIn() > 0)) { - $infoO = $this->getLicenseInfo(); - $infoText = $infoO['infoText']; - $js = (EnterpriseUtils::skinIsUx() == 1) ? "Ext.MessageBox.show({title: '', msg: '$infoText', buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.INFO});" : "msgBox('$infoText');"; - $linkText = $linkText . "" . G::LoadTranslation('ID_EXPIRES_IN') . " " . $this->getExpireIn() . " " . G::LoadTranslation('ID_DAYS') . ""; - } else { - if ($this->getExpireIn() != "NEVER" && (int)$this->getExpireIn() <= 0) { - $infoO = $this->getLicenseInfo(); - $infoText = $infoO['infoText']; - $infoLabel = $infoO['infoLabel']; - $js = (EnterpriseUtils::skinIsUx() == 1) ? "Ext.MessageBox.show({title: '', msg: '$infoText', buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.INFO});" : "msgBox('$infoText');"; - $linkText = $linkText . "" . $infoLabel . ""; - } - } - - if (class_exists('pmTrialPlugin')) { - $linkText = $linkText . " "; - } - - if (isset($_SESSION["__ENTERPRISE_SYSTEM_UPDATE__"]) && $_SESSION["__ENTERPRISE_SYSTEM_UPDATE__"] == 1) { - $aOnclick = "onclick=\"this.href='" . EnterpriseUtils::getUrlServerName() . "/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN . "/setup/main?s=PMENTERPRISE';\""; - if (EnterpriseUtils::skinIsUx() == 1) { - $aOnclick = "onclick=\"Ext.ComponentMgr.get('mainTabPanel').setActiveTab('pm-option-setup'); Ext.ComponentMgr.get('pm-option-setup').setLocation(Ext.ComponentMgr.get('pm-option-setup').defaultSrc + 's=PMENTERPRISE', true); return (false);\""; - } - $linkText = $linkText . (($linkText != null) ? " | " : null) . "" . G::LoadTranslation('ID_UPGRADE_SYSTEM') . ""; - } - $linkText = ($linkText != null) ? $linkText . ((EnterpriseUtils::skinIsUx() == 1) ? null : " |") : null; - return ($linkText); - } - - public function validateLicense($path) - { - $application = new license_application($path, false, true, false, true, true); - $results = $application->validate(false, false, "", "", "80", true); - - if ($results ['RESULT'] != 'OK') { - return true; - } else { - return false; - } - } - - public function installLicense($path, $redirect = true, $includeExpired = true) - { - $application = new license_application($path, false, true, false, true, true); - - $results = $application->validate(false, false, "", "", "80", true); - - //if the result is ok then it is saved into DB - $res = $results ['RESULT']; - if ($res == 'EMPTY') { - return false; - } - if (!$includeExpired) { - if ($res == 'EXPIRED') { - return false; - } - } - if (($res != 'OK') && ($res != 'EXPIRED') && ($res != 'TMINUS')) { - G::SendTemporalMessage('ID_ISNT_LICENSE', 'tmp-info', 'labels'); - return false; - } else { - $oServerConf = ServerConf::getSingleton(); - $oServerConf->setProperty('ACTIVE_LICENSE', [config("system.workspace") => $path]); - $this->saveDataLicense($results, $path, $redirect); - if ($redirect) { - G::Header('location: ../enterprise/addonsStore'); - } else { - return true; - } - } - } - - /* - get Active License - */ - public function getActiveLicense() - { - //get license from database, table LICENSE_MANAGER - try { - $aRow = []; - require_once("classes/model/LicenseManager.php"); - $oCriteria = new Criteria('workflow'); - $oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_USER); - $oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_START); - $oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_PATH); - $oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_DATA); - $oCriteria->add(LicenseManagerPeer::LICENSE_STATUS, 'ACTIVE'); - $oDataset = LicenseManagerPeer::doSelectRS($oCriteria); - $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC); - $oDataset->next(); - $aRow = $oDataset->getRow(); - } catch (Exception $e) { - G::pr($e); - } - return $aRow; - } - - public function lookForStatusLicense() - { - require_once("classes/model/LicenseManager.php"); - //obtening info in a row that has ACTIVE status - $oCtia = new Criteria('workflow'); - $oCtia->add(LicenseManagerPeer::LICENSE_STATUS, 'ACTIVE'); - $oDataset = LicenseManagerPeer::doSelectRS($oCtia); - $oDataset->next(); - $aRow = $oDataset->getRow(); - - $oCtiaA = new Criteria('workflow'); - $oCtiaA->add(LicenseManagerPeer::LICENSE_UID, $aRow [0]); - - $oCtiaB = new Criteria('workflow'); - $oCtiaB->add(LicenseManagerPeer::LICENSE_STATUS, 'INACTIVE'); - BasePeer::doUpdate($oCtiaA, $oCtiaB, Propel::getConnection('workflow')); - return 'ACTIVE'; - } - - public function saveDataLicense($results, $path) - { - try { - //getting info about file - $LicenseUid = G::generateUniqueID(); - $LicenseUser = $results ['DATA'] ['FIRST_NAME'] . ' ' . $results ['DATA'] ['LAST_NAME']; - $LicenseStart = $results ['DATE'] ['START']; - $LicenseEnd = $results ['DATE'] ['END']; - $LicenseSpan = $results ['DATE'] ['SPAN']; - $LicenseStatus = $this->lookForStatusLicense(); //we're looking for a status ACTIVE - - //getting the content from file - - $filter = new InputFilter(); - $path = $filter->xssFilterHard($path, 'path'); - - $handle = fopen($path, "r"); - $contents = fread($handle, filesize($path)); - fclose($handle); - $LicenseData = $contents; - $LicensePath = $path; - $LicenseWorkspace = isset($results['DATA']['DOMAIN_WORKSPACE']) ? $results['DATA']['DOMAIN_WORKSPACE'] : ''; - $LicenseType = $results['DATA']['TYPE']; - - require_once("classes/model/LicenseManager.php"); - - //if exists the row in the database propel will update it, otherwise will insert. - $tr = LicenseManagerPeer::retrieveByPK($LicenseUid); - if (!(is_object($tr) && get_class($tr) == 'LicenseManager')) { - $tr = new LicenseManager(); - } - $tr->setLicenseUid($LicenseUid); - $tr->setLicenseUser($LicenseUser); - $tr->setLicenseStart($LicenseStart); - $tr->setLicenseEnd($LicenseEnd); - $tr->setLicenseSpan($LicenseSpan); - $tr->setLicenseStatus($LicenseStatus); - $tr->setLicenseData($LicenseData); - $tr->setLicensePath($LicensePath); - $tr->setLicenseWorkspace($LicenseWorkspace); - $tr->setLicenseType($LicenseType); - - $res = $tr->save(); - Cache::forget(PmLicenseManager::CACHE_KEY . '.' . config("system.workspace")); - } catch (Exception $e) { - G::pr($e); - } - } - - public function getResultQry($sNameTable, $sfield, $sCondition) - { - try { - require_once("classes/model/LicenseManager.php"); - $oCriteria = new Criteria('workflow'); - $oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_USER); - $oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_START); - $oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_PATH); - $oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_DATA); - $oCriteria->add(LicenseManagerPeer::LICENSE_STATUS, 'ACTIVE'); - $oDataset = LicenseManagerPeer::doSelectRS($oCriteria); - $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC); - $oDataset->next(); - $aRow = $oDataset->getRow(); - } catch (Exception $e) { - G::pr($e); - $aRow = []; - } - return $aRow; - } - - public function getActiveFeatures() - { - if (file_exists(PATH_PLUGINS . 'enterprise/data/default')) { - return []; - } - return unserialize(G::decrypt($this->serial, file_get_contents(PATH_PLUGINS . 'enterprise/data/default'))); - } -} diff --git a/workflow/engine/classes/WorkspaceTools.php b/workflow/engine/classes/WorkspaceTools.php index 1666f9e54..5c6d9b59f 100755 --- a/workflow/engine/classes/WorkspaceTools.php +++ b/workflow/engine/classes/WorkspaceTools.php @@ -2306,11 +2306,6 @@ class WorkspaceTools CLI::logging("* End converting Output Documents from 'HTML2PDF' to 'TCPDF...(Completed on " . (microtime(true) - $start) . " seconds)\n"); } - CLI::logging("> Start To Verify License Enterprise...\n"); - $start = microtime(true); - $workspace->verifyLicenseEnterprise($workspaceName); - CLI::logging("* End To Verify License Enterprise...(" . (microtime(true) - $start) . " seconds)\n"); - // Updating generated class files for PM Tables passthru(PHP_BINARY . ' processmaker regenerate-pmtable-classes ' . $workspaceName); } @@ -2457,88 +2452,6 @@ class WorkspaceTools } } - public function changeHashPassword($workspace, $response) - { - $this->initPropel(true); - - EnterpriseClass::setHashPassword($response); - - return true; - } - - public function verifyFilesOldEnterprise() - { - $pathBackup = PATH_DATA . 'backups'; - if (!file_exists($pathBackup)) { - G::mk_dir($pathBackup, 0777); - } - $pathNewFile = PATH_DATA . 'backups' . PATH_SEP . 'enterpriseBackup'; - $pathDirectoryEnterprise = PATH_CORE . 'plugins' . PATH_SEP . 'enterprise'; - $pathFileEnterprise = PATH_CORE . 'plugins' . PATH_SEP . 'enterprise.php'; - - if (!file_exists($pathDirectoryEnterprise) && !file_exists($pathFileEnterprise)) { - CLI::logging(" Without changes... \n"); - return true; - } - CLI::logging(" Migrating Enterprise Core version...\n"); - if (!file_exists($pathNewFile)) { - CLI::logging(" Creating folder in $pathNewFile\n"); - G::mk_dir($pathNewFile, 0777); - } - $shared_stat = stat(PATH_DATA); - if (file_exists($pathDirectoryEnterprise)) { - CLI::logging(" Copying Enterprise Directory to $pathNewFile...\n"); - - if ($shared_stat !== false) { - WorkspaceTools::dirPerms($pathDirectoryEnterprise, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode'] & 0777); - } else { - CLI::logging(CLI::error("Could not get shared folder permissions, workspace permissions couldn't be changed") . "\n"); - } - if (G::recursive_copy($pathDirectoryEnterprise, $pathNewFile . PATH_SEP . 'enterprise')) { - CLI::logging(" Removing $pathDirectoryEnterprise...\n"); - G::rm_dir($pathDirectoryEnterprise); - } else { - CLI::logging(CLI::error(" Error: Failure to copy from $pathDirectoryEnterprise...\n")); - } - if (file_exists($pathDirectoryEnterprise)) { - CLI::logging(CLI::info(" Remove manually $pathDirectoryEnterprise...\n")); - } - } - if (file_exists($pathFileEnterprise)) { - CLI::logging(" Copying Enterprise.php file to $pathNewFile...\n"); - if ($shared_stat !== false) { - WorkspaceTools::dirPerms($pathFileEnterprise, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode'] & 0777); - } else { - CLI::logging(CLI::error("Could not get shared folder permissions, workspace permissions couldn't be changed") . "\n"); - } - CLI::logging(" Removing $pathFileEnterprise...\n"); - copy($pathFileEnterprise, $pathNewFile . PATH_SEP . 'enterprise.php'); - G::rm_dir($pathFileEnterprise); - if (file_exists($pathFileEnterprise)) { - CLI::logging(CLI::info(" Remove manually $pathFileEnterprise...\n")); - } - } - } - - /** - * @param $workspace - */ - public function verifyLicenseEnterprise($workspace) - { - $this->initPropel(true); - $oCriteria = new Criteria('workflow'); - $oCriteria->add(LicenseManagerPeer::LICENSE_STATUS, 'ACTIVE'); - $oDataset = LicenseManagerPeer::doSelectRS($oCriteria); - $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC); - if ($oDataset->next()) { - $row = $oDataset->getRow(); - $tr = LicenseManagerPeer::retrieveByPK($row['LICENSE_UID']); - $tr->setLicensePath(PATH_DATA_SITE . basename($row['LICENSE_PATH'])); - $tr->setLicenseWorkspace($workspace); - $res = $tr->save(); - } - } - /** * Generate data for table APP_ASSIGN_SELF_SERVICE_VALUE * @@ -3294,29 +3207,6 @@ class WorkspaceTools } } - /** - * 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; - } - } - /** * Process files upgrade, store the information in the DB * diff --git a/workflow/engine/classes/WsBase.php b/workflow/engine/classes/WsBase.php index 55acc5e0b..6a19d38e5 100644 --- a/workflow/engine/classes/WsBase.php +++ b/workflow/engine/classes/WsBase.php @@ -910,11 +910,8 @@ class WsBase $arrayConfigAux = []; if (is_array($config)) { - if (PMLicensedFeatures::getSingleton()->verifyfeature("nKaNTNuT1MzK0RsMEtXTnYzR09ucHF2WGNuS0hRdDBBak42WXJhNVVOOG1INEVoaU1EaTllbjBBeEJNeG9wRVJ6NmxQelhyVTBvdThzPQ==")) { - $arrayConfigAux = $config; - } + $arrayConfigAux = $config; } else { - if (PMLicensedFeatures::getSingleton()->verifyfeature("zIKRGpDM3pjcHFsWGplNDN0dTl5bGN3UTNiOWdQU0E5Q05QTksrU1ladWQ0VT0=")) { $emailServer = new EmailServer(); $criteria = $emailServer->getEmailServerCriteria(); $criteria->add(EmailServerPeer::MESS_UID, $config, Criteria::EQUAL); @@ -932,7 +929,6 @@ class WsBase $arrayConfigAux["OAUTH_REFRESH_TOKEN"] = !empty($row["OAUTH_REFRESH_TOKEN"]) ? Crypt::decryptString($row["OAUTH_REFRESH_TOKEN"]) : ''; } - } } $setup = (!empty($arrayConfigAux)) ? $arrayConfigAux : System::getEmailConfiguration(); diff --git a/workflow/engine/classes/class.license.app.php b/workflow/engine/classes/class.license.app.php deleted file mode 100644 index 541f15245..000000000 --- a/workflow/engine/classes/class.license.app.php +++ /dev/null @@ -1,7 +0,0 @@ -sClassName == 'enterprisePlugin') ? PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . $menuFilename : PATH_PLUGINS . $this->sPluginFolder . PATH_SEP . $menuFilename; + $sMenuFilename = PATH_PLUGINS . $this->sPluginFolder . PATH_SEP . $menuFilename; PluginRegistry::loadSingleton()->registerMenu($this->sNamespace, $menuId, $sMenuFilename); } @@ -444,19 +444,10 @@ class PMPlugin extends PmPluginCompatibility public static function getListPluginsManager($workspace) { $items = array(); - $aPluginsPP = array(); - if (is_file(PATH_PLUGINS . 'enterprise/data/data')) { - $aPlugins = unserialize(trim(file_get_contents(PATH_PLUGINS . 'enterprise/data/data'))); - foreach ($aPlugins as $aPlugin) { - $aPluginsPP[] = substr($aPlugin['sFilename'], 0, strpos($aPlugin['sFilename'], '-')) . '.php'; - } - } + $oPluginRegistry = PluginRegistry::loadSingleton(); if ($handle = opendir(PATH_PLUGINS)) { while (false !== ($file = readdir($handle))) { - if (in_array($file, $aPluginsPP)) { - continue; - } if (strpos($file, '.php', 1) && is_file(PATH_PLUGINS . $file)) { include_once(PATH_PLUGINS . $file); /** @var \ProcessMaker\Plugins\Interfaces\PluginDetail $pluginDetail */ diff --git a/workflow/engine/classes/class.pmLicenseManager.php b/workflow/engine/classes/class.pmLicenseManager.php deleted file mode 100644 index 541f15245..000000000 --- a/workflow/engine/classes/class.pmLicenseManager.php +++ /dev/null @@ -1,7 +0,0 @@ -getAddonDownloadFilename(); - if (!isset($filename) || empty($filename)) { - $filename = "download.tar"; - } - $dir = $this->getDownloadDirectory(); - return "$dir/$filename"; - } - - public function getDownloadDirectory() - { - $dir = PATH_DATA . "upgrade/{$this->getStoreId()}_{$this->getAddonName()}"; - if (!file_exists($dir)) { - mkdir($dir, 0777, true); - } - return ($dir); - } - - /** - * Check to see if the download file exists and has the right data. - * - * @return mixed true if exists and md5 is good, false otherwise. Returns null - * if file exists but md5 for the download is not available. - */ - public function checkDownload() - { - $filename = $this->getDownloadFilename(); - if (!file_exists($filename)) { - return false; - } - $download_md5 = $this->getAddonDownloadMd5(); - if ($download_md5 == null) { - return null; - } - return (strcasecmp(G::encryptFileOld($filename), $download_md5) == 0); - } - - /** - * Returns if this addon is of type 'plugin' - * - * @return bool true if is of type 'plugin', false otherwise - */ - public function isPlugin() - { - return ($this->getAddonType() == 'plugin'); - } - - /** - * Returns if this addon is of type 'core' - * - * @return bool true if is of type 'core', false otherwise - */ - public function isCore() - { - return ($this->getAddonType() == 'core'); - } - - /** - * Returns if this addon is installed or not- - * - * @return bool true if installed, false otherwise - */ - public function isInstalled() - { - if ($this->isCore()) { - return ($this->getAddonVersion() == $this->getInstalledVersion()); - } elseif ($this->isPlugin()) { - return (file_exists(PATH_PLUGINS . "{$this->getAddonName()}.php")); - } else { - throw new Exception("Addon type '{$this->getAddonType()}' unsupported"); - } - } - - /** - * Returns if this addon is enabled or not. - * - * @return bool true if enabled, false otherwise - */ - public function isEnabled() - { - if ($this->isCore()) { - return $this->isInstalled(); - } elseif ($this->isPlugin()) { - if (!$this->isInstalled()) { - return false; - } - $oPluginRegistry = PluginRegistry::loadSingleton(); - return $oPluginRegistry->isEnable($this->getAddonName()); - } else { - throw new Exception("Addon type '{$this->getAddonType()}' unsupported"); - } - } - - public function setEnabled($enable = true) - { - if (!$this->isInstalled() || !$this->isPlugin()) { - return false; - } - if ($this->getAddonName() == "enterprise") { - return false; - } - - $oPluginRegistry = PluginRegistry::loadSingleton(); - - - $filter = new InputFilter(); - $requiredPath = PATH_PLUGINS . $this->getAddonName() . ".php"; - $requiredPath = $filter->validateInput($requiredPath, 'path'); - require_once($requiredPath); - - if ($enable) { - $oPluginRegistry->enablePlugin($this->getAddonName()); - $oPluginRegistry->setupPlugins(); //get and setup enabled plugins - } else { - $oPluginRegistry->disablePlugin($this->getAddonName()); - } - $oPluginRegistry->savePlugin($this->getAddonName()); - return true; - } - - /** - * Returns the currently installed version of this addon. - * - * @return string the installed version or an empty string otherwise. - */ - public function getInstalledVersion() - { - if ($this->isCore()) { - return (EnterpriseUtils::pmVersion(System::getVersion())); - } else { - if ($this->isPlugin()) { - if (!$this->isInstalled()) { - return (null); - } - - $oPluginRegistry = PluginRegistry::loadSingleton(); - $details = $oPluginRegistry->getPluginDetails($this->getAddonName() . ".php"); - $v = (!($details == null))? $details->getVersion() : null; - - if ($v != "") { - return ($v); - } - - if (file_exists(PATH_PLUGINS . $this->getAddonName() . PATH_SEP . "VERSION")) { - return (trim(file_get_contents(PATH_PLUGINS . $this->getAddonName() . PATH_SEP . "VERSION"))); - } - } else { - if ($this->getAddonType() == "core") { - throw new Exception("Addon type \"" . $this->getAddonType() . "\" unsupported"); - } - } - } - } - - public function refresh() - { - /* Update our information from the db */ - $rs = $this->getPeer()->doSelectRS($this->buildPkeyCriteria()); - $rs->first(); - $this->hydrate($rs); - } - - /** - * Download this addon from the download url. - * - * @return bool true on success, false otherwise. - */ - public function download() - { - $this->setState("download"); - - /////// - $aux = explode("?", $this->getAddonDownloadUrl()); - - $url = $aux[0]; - $var = explode("&", $aux[1]); - - /////// - $boundary = "---------------------" . substr(G::encryptOld(rand(0, 32000)), 0, 10); - $data = null; - - for ($i = 0; $i <= count($var) - 1; $i++) { - $aux = explode("=", $var[$i]); - - $data = $data . "--$boundary\n"; - $data = $data . "Content-Disposition: form-data; name=\"" . $aux[0] . "\"\n\n" . $aux[1] . "\n"; - } - - if (count($var) > 0) { - $data = $data . "--$boundary\n"; - } - - /////// - $licenseManager = PmLicenseManager::getSingleton(); - $activeLicense = $licenseManager->getActiveLicense(); - - $data = $data . "Content-Disposition: form-data; name=\"licenseFile\"; filename=\"" . $licenseManager->file . "\"\n"; - $data = $data . "Content-Type: text/plain\n"; - //$data = $data . "Content-Type: image/jpeg\n"; - $data = $data . "Content-Transfer-Encoding: binary\n\n"; - $data = $data . file_get_contents($activeLicense["LICENSE_PATH"]) . "\n"; - $data = $data . "--$boundary\n"; - - /////// - $option = array( - "http" => array( - "method" => "POST", - //"method" => "post", - "header" => "Content-Type: multipart/form-data; boundary=" . $boundary, - "content" => $data - ) - ); - - // Proxy settings - $sysConf = System::getSystemConfiguration(); - if ($sysConf['proxy_host'] != '') { - if (!is_array($option['http'])) { - $option['http'] = array(); - } - $option['http']['request_fulluri'] = true; - $option['http']['proxy'] = 'tcp://' . $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''); - if ($sysConf['proxy_user'] != '') { - if (!isset($option['http']['header'])) { - $option['http']['header'] = ''; - } - $option['http']['header'] .= 'Proxy-Authorization: Basic ' . base64_encode($sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : '')); - } - } - - $context = stream_context_create($option); - - /////// - $handle = fopen($url, "rb", false, $context); - - if ($handle === false) { - throw new Exception("Could not open download url."); - } - - $this->setAddonDownloadFilename(null); - - //Try to get the download size and filename (ok if it fails) - $meta = stream_get_meta_data($handle); - $totalSize = 0; - - if ($meta["wrapper_type"] == "http") { - foreach ($meta["wrapper_data"] as $info) { - $info = explode(":", $info); - if (strcasecmp(trim($info[0]), "Content-Length") == 0) { - $totalSize = intval(trim($info[1])); - } - if (strcasecmp(trim($info[0]), "Content-Disposition") == 0) { - foreach (explode(";", $info[1]) as $params) { - $params = explode("=", $params); - if (count($params) <= 1) { - continue; - } - if (strcasecmp(trim($params[0]), "filename") == 0) { - $this->setAddonDownloadFilename(trim($params[1], "\" ")); - } - } - } - } - } - - //Save the filename - $this->save(); - - $units = array(" B", " KB", " MB", " GB", " TB"); - //if ($totalSize) { - // $bytes = $totalSize; - // for ($i = 0; $bytes >= 1024 && $i < 4; $i++) $bytes /= 1024; - // printf("Download size: %.2f%s\n", round($bytes, 2), $units[$i]); - //} - - $downloadFile = $this->getDownloadFilename(); - $file = @fopen($downloadFile, "wb"); - - if ($file === false) { - throw new Exception("Could not open destination file."); - } - - $start = microtime(true); - $rate = null; - $position = null; - $elapsed = null; - - while (!feof($handle)) { - $this->refresh(); - /* Check if download was cancelled from the ui */ - if ($this->getAddonState() == "cancel" || $this->getAddonState() == "") { - $this->setState(); - break; - } - /* Update the database information to show we are still alive */ - $this->setState("download"); - $data = fread($handle, BUFSIZE); - //TODO: We should use these values for something - $elapsed = microtime(true) - $start; - $position = ftell($handle); - $rate = $position / $elapsed; - if ($totalSize) { - $progress = 100 * ($position / $totalSize); - $this->setAddonDownloadProgress($progress); - $this->save(); - } - /* Just to be safe, check all error conditions */ - if ($data === "" or $data === false) { - break; - } - if (fwrite($file, $data) === false) { - break; - } - } - fclose($handle); - fclose($file); - - if ($elapsed > 60) { - $time = sprintf("%.0f minutes and %.0f seconds", round($elapsed / 60), round($elapsed) % 60); - } else { - $time = sprintf("%.0f seconds", round($elapsed)); - } - - for ($i = 0; $position >= 1024 && $i < 4; $i++) { - $position /= 1024; - } - for ($j = 0; $rate >= 1024 && $j < 4; $j++) { - $rate /= 1024; - } - //printf("Downloaded %.2f%s in %s (rate: %.2f%s/s)\n", $position, $units[$i], $time, $rate, $units[$j]); - - return ($this->checkDownload()); - } - - /** - * Install this addon from the downloaded file. - */ - public function install() - { - $this->setState("install"); - - $filename = $this->getDownloadFilename(); - //if ($this->checkDownload() === false) { - // throw new Exception("Download file is invalid"); - //} - - if ($this->isPlugin()) { - if ($this->getAddonId() == "enterprise") { - $_SESSION["__ENTERPRISE_INSTALL__"] = 1; - } - - $oPluginRegistry = PluginRegistry::loadSingleton(); - $oPluginRegistry->installPluginArchive($filename, $this->getAddonName()); - - $this->setState(); - } else { - throw new Exception("Addon type {$this->getAddonType()} not supported."); - } - } - - public function uninstall() - { - if ($this->isPlugin()) { - if (!$this->isInstalled()) { - return false; - } - - $oPluginRegistry = PluginRegistry::loadSingleton(); - $oPluginRegistry->uninstallPlugin($this->getAddonName()); - - return true; - } - } - - public function getInstallLog() - { - $logFile = $this->getDownloadDirectory() . "/download.log"; - $contents = false; - if (file_exists($logFile)) { - $contents = @file_get_contents($logFile); - } - if ($contents === false) { - return null; - } - return $contents; - } - - public function setState($state = "") - { - $this->setAddonState($state); - $this->setAddonStateChanged('now'); - $this->save(); - } - - public function checkState() - { - if ($this->getAddonState() == 'error') { - $this->setState(); - return false; - } - if ($this->getAddonState() == '' || $this->getAddonState() == 'install-finish') { - return true; - } - $elapsed = time() - strtotime($this->getAddonStateChanged()); - $timeout = 3; - if ($this->isCore()) { - $timeout = 10; - } - if ($elapsed > $timeout * 60) { - $this->setState(); - return false; - } - return true; - } - - /** - * Exists in Addons Manager Table - * - * @param string $addonId - * @param string $storeId - * @return type - * @throws type - */ - public function exists($addonId, $storeId) - { - $oAddManager = AddonsManagerPeer::retrieveByPK($addonId, $storeId); - - return (!is_null($oAddManager)); - } - - /** - * Update Addons Manager Table - * - * @param type $data - * @return type - * @throws type - */ - public function update($data) - { - $con = Propel::getConnection(AddonsManagerPeer::DATABASE_NAME); - try { - $con->begin(); - $this->setNew(false); - $this->fromArray($data, BasePeer::TYPE_FIELDNAME); - if ($this->validate()) { - $result = $this->save(); - $con->commit(); - return $result; - } else { - $con->rollback(); - throw (new Exception("Failed Validation in class " . get_class($this) . ".")); - } - } catch (Exception $e) { - $con->rollback(); - throw ($e); - } - } -} diff --git a/workflow/engine/classes/model/AddonsManagerPeer.php b/workflow/engine/classes/model/AddonsManagerPeer.php deleted file mode 100644 index ce8c2c152..000000000 --- a/workflow/engine/classes/model/AddonsManagerPeer.php +++ /dev/null @@ -1,24 +0,0 @@ -setStoreId($storeId); - $store->setStoreLocation($storeLocation); - $store->setStoreVersion($storeVersion); - $store->setStoreType($storeType); - - return AddonsStorePeer::doInsert($store); - } - - /** - * Check if the current license has a store and removes unwanted stores. - * - * @return bool true if a store was added, false otherwise. - */ - public static function checkLicenseStore() - { - //getting the licenseManager.... - $licenseManager = PmLicenseManager::getSingleton(); - - if (isset($licenseManager->id)) { - //Remove any license store that is not the active license - $criteria = new Criteria(AddonsStorePeer::DATABASE_NAME); - $criteria->addSelectColumn("*"); - $criteria->add(AddonsStorePeer::STORE_TYPE, "license", Criteria::EQUAL); - $criteria->add(AddonsStorePeer::STORE_ID, $licenseManager->id, Criteria::NOT_EQUAL); - - foreach (AddonsStorePeer::doSelect($criteria) as $store) { - $store->clear(); - } - - AddonsStorePeer::doDelete($criteria); - - //If the active license doesn't have a store, add one for it - if (AddonsStorePeer::retrieveByPK($licenseManager->id) === null) { - preg_match("/^license_(.*).dat$/", $licenseManager->file, $matches); - $realId = urlencode($matches[1]); - $workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv'; - $addonLocation = "http://{$licenseManager->server}/sys".$workspace."/en/green/services/addonsStore?action=getInfo&licId=$realId"; - - self::addStore($licenseManager->id, $addonLocation); - - return true; - } - } - - return false; - } - - public static function addonList($type = 'plugin') - { - $result = array(); - - AddonsStore::checkLicenseStore(); - - $licenseManager = PmLicenseManager::getSingleton(); //Getting the licenseManager - - $result["store_errors"] = array(); - list($stores, $errors) = AddonsStore::updateAll(false, $type); - - foreach ($errors as $store_id => $store_error) { - $result["store_errors"][] = array("id" => $store_id, "msg" => $store_error); - } - - $result["addons"] = array(); - $result["errors"] = array(); - - $criteria = new Criteria(); - $criteria->addAscendingOrderByColumn(AddonsManagerPeer::ADDON_TYPE); - $criteria->addAscendingOrderByColumn(AddonsManagerPeer::ADDON_ID); - $criteria->add(AddonsManagerPeer::ADDON_TYPE, $type, Criteria::EQUAL); - $addons = AddonsManagerPeer::doSelect($criteria); - - foreach ($addons as $addon) { - if ($addon->getAddonState() != '' && $addon->isInstalled()) { - $addon->setState(); - $addon->refresh(); - } - - $status = $addon->getAddonStatus(); - $version = $addon->getAddonVersion(); - $enabled = null; - - if (!$addon->checkState()) { - $result["errors"][] = array("addonId" => $addon->getAddonId(), "storeId" => $addon->getStoreId()); - } - - $sw = 1; - if ($type == 'plugin') { - $addonInLicense = false; - if (!empty($addon->getAddonId()) && !empty($licenseManager->features)) { - $addonInLicense = in_array($addon->getAddonId(), $licenseManager->features); - } - - if ($sw == 1 && $addon->getAddonId() != "enterprise" && !$addonInLicense) { - $sw = 0; - } - if ($sw == 1 && $addon->isInstalled()) { - if ($addon->isEnabled()) { - $status = "installed"; - } else { - $status = "disabled"; - } - - $version = $addon->getInstalledVersion(); - - if (version_compare($version . "", $addon->getAddonVersion() . "", "<")) { - $status = "upgrade"; - } - - $enabled = (bool)$addon->isEnabled(); - $sw = 0; - } - } else { - $status = "available"; - $enabled = false; - $addonInLicense = in_array($addon->getAddonId(), $licenseManager->licensedfeatures); - if (in_array($addon->getAddonName(), $licenseManager->licensedfeatures) == 1) { - $status = "installed"; - $enabled = true; - } - } - - if ($sw == 1 && $addonInLicense) { - $status = "ready"; - $sw = 0; - } - - $state = $addon->getAddonState(); - $log = null; - - if ($state != null) { - $status = $state; - $log = $addon->getInstallLog(); - } - if ($addon->getAddonId() == "enterprise" && $status== 'ready') { - $status = 'installed'; - } - if ($status == 'minus-circle') { - $status = "available"; - } - - $result["addons"][$addon->getAddonId()] = array( - "id" => $addon->getAddonId(), - "store" => $addon->getStoreId(), - "name" => $addon->getAddonName(), - "nick" => $addon->getAddonNick(), - "version" => $version, - "enabled" => $enabled, - "latest_version" => $addon->getAddonVersion(), - "type" => $addon->getAddonType(), - "release_type" => $addon->getAddonReleaseType(), - "url" => $addon->getAddonDownloadUrl(), - "publisher" => $addon->getAddonPublisher(), - "description" => $addon->getAddonDescription(), - "status" => $status, - "log" => $log, - "progress" => round($addon->getAddonDownloadProgress()) - ); - } - - return $result; - } - - public static function addonFeatureList() - { - $result = array(); - - AddonsStore::checkLicenseStore(); - - $licenseManager = PmLicenseManager::getSingleton(); //Getting the licenseManager - - $result["store_errors"] = array(); - list($stores, $errors) = AddonsStore::updateAll(false); - - foreach ($errors as $store_id => $store_error) { - $result["store_errors"][] = array("id" => $store_id, "msg" => $store_error); - } - - $result["addons"] = array(); - $result["errors"] = array(); - - $criteria = new Criteria(); - $criteria->addAscendingOrderByColumn(AddonsManagerPeer::ADDON_TYPE); - $criteria->addAscendingOrderByColumn(AddonsManagerPeer::ADDON_ID); - $addons = AddonsManagerPeer::doSelect($criteria); - - foreach ($addons as $addon) { - $status = $addon->getAddonStatus(); - $version = $addon->getAddonVersion(); - $enabled = null; - - if (!$addon->checkState()) { - $result["errors"][] = array("addonId" => $addon->getAddonId(), "storeId" => $addon->getStoreId()); - } - - $sw = 1; - - $addonInLicense = false; - if (!empty($addon->getAddonId()) && !empty($licenseManager->features)) { - $addonInLicense = in_array($addon->getAddonId(), $licenseManager->features); - } - - if ($sw == 1 && $addon->getAddonId() != "enterprise" && !$addonInLicense) { - $sw = 0; - } - - if ($sw == 1 && $addon->isInstalled()) { - if ($addon->isEnabled()) { - $status = "installed"; - } else { - $status = "disabled"; - } - - $version = $addon->getInstalledVersion(); - - if (version_compare($version . "", $addon->getAddonVersion() . "", "<")) { - $status = "upgrade"; - } - - $enabled = $addon->isEnabled(); - $sw = 0; - } - - if ($sw == 1 && $addonInLicense) { - $status = "ready"; - $sw = 0; - } - - $state = $addon->getAddonState(); - $log = null; - - if ($state != null) { - $status = $state; - $log = $addon->getInstallLog(); - } - if ($addon->getAddonId() == "enterprise" && $status== 'ready') { - $status = 'installed'; - } - if ($status == 'minus-circle') { - $status = "available"; - } - - $result["addons"][$addon->getAddonId()] = array( - "id" => $addon->getAddonId(), - "store" => $addon->getStoreId(), - "name" => $addon->getAddonName(), - "nick" => $addon->getAddonNick(), - "version" => $version, - "enabled" => $enabled, - "latest_version" => $addon->getAddonVersion(), - "type" => $addon->getAddonType(), - "release_type" => $addon->getAddonReleaseType(), - "url" => $addon->getAddonDownloadUrl(), - "publisher" => $addon->getAddonPublisher(), - "description" => $addon->getAddonDescription(), - "status" => $status, - "log" => $log, - "progress" => round($addon->getAddonDownloadProgress()) - ); - } - - return $result; - } - - /** - * Returns all stores as AddonsStore objects. - * - * @return array of AddonsStore objects - */ - public static function listStores() - { - $criteria = new Criteria(AddonsStorePeer::DATABASE_NAME); - - return AddonsStorePeer::doSelect($criteria); - } - - /** - * Updates all stores - * - * @return array containing a 'stores' array and a 'errors' array - */ - public static function updateAll($force = false, $type = 'plugin') - { - $stores = array(); - $errors = array(); - - foreach (self::listStores() as $store) { - try { - $stores[$store->getStoreId()] = $store->update($force, $type); - } catch (Exception $e) { - $errors[$store->getStoreId()] = $e->getMessage(); - } - } - - return array($stores, $errors); - } - - /** - * Clear this store addons - * - * @return int number of addons removed - */ - public function clear($type = 'plugin') - { - /* Remove old items from this store */ - $criteria = new Criteria(AddonsManagerPeer::DATABASE_NAME); - $criteria->add(AddonsManagerPeer::STORE_ID, $this->getStoreId(), Criteria::EQUAL); - $criteria->add(AddonsManagerPeer::ADDON_TYPE, $type, Criteria::EQUAL); - - return AddonsManagerPeer::doDelete($criteria); - } - - /** - * Update this store information from the store location. - * - * @return bool true if updated, false otherwise - */ - public function update($force = false, $type = 'plugin') - { - //If we have any addon that is installing or updating, don't update store - $criteria = new Criteria(AddonsManagerPeer::DATABASE_NAME); - $criteria->add(AddonsManagerPeer::ADDON_STATE, '', Criteria::NOT_EQUAL); - $criteria->add(AddonsManagerPeer::ADDON_TYPE, $type); - - if (AddonsManagerPeer::doCount($criteria) > 0) { - return false; - } - - $this->clear($type); - - //Fill with local information - - //List all plugins installed - $oPluginRegistry = PluginRegistry::loadSingleton(); - $aPluginsPP = array(); - - $eeData = Cache::get(config('system.workspace') . 'enterprise.ee', function () { - if (file_exists(PATH_DATA_SITE . 'ee')) { - return trim(file_get_contents(PATH_DATA_SITE . 'ee')); - } - return null; - }); - if ($eeData) { - $aPluginsPP = unserialize($eeData); - } - - $pmLicenseManagerO = PmLicenseManager::getSingleton(); - $localPlugins = array(); - - if ($type == 'plugin') { - foreach ($aPluginsPP as $aPlugin) { - $sClassName = substr($aPlugin['sFilename'], 0, strpos($aPlugin['sFilename'], '-')); - - if (file_exists(PATH_PLUGINS . $sClassName . '.php')) { - require_once PATH_PLUGINS . $sClassName . '.php'; - - $oDetails = $oPluginRegistry->getPluginDetails($sClassName . '.php'); - - if ($oDetails) { - $sStatus = $oDetails->isEnabled() ? G::LoadTranslation('ID_ENABLED') : G::LoadTranslation('ID_DISABLED'); - - if ($oDetails->getWorkspaces()) { - if (!in_array(config("system.workspace"), $oDetails->getWorkspaces())) { - continue; - } - } - - if ($sClassName == "pmLicenseManager" || $sClassName == "pmTrial") { - continue; - } - - $sEdit = (($oDetails->getSetupPage() != '') && ($oDetails->isEnabled())? G::LoadTranslation('ID_SETUP') : ' '); - $aPlugin = array(); - $aPluginId = $sClassName; - $aPluginTitle = $oDetails->getFriendlyName(); - $aPluginDescription = $oDetails->getDescription(); - $aPluginVersion = $oDetails->getVersion(); - - if (@in_array($sClassName, $pmLicenseManagerO->features)) { - $aPluginStatus = $sStatus; - $aPluginLinkStatus = 'pluginsChange?id=' . $sClassName . '.php&status=' . $oDetails->isEnabled(); - $aPluginEdit = $sEdit; - $aPluginLinkEdit = 'pluginsSetup?id=' . $sClassName . '.php'; - $aPluginStatusA = $sStatus == "Enabled" ? "installed" : 'disabled'; - $enabledStatus = true; - } else { - $aPluginStatus = ""; - $aPluginLinkStatus = ''; - $aPluginEdit = ''; - $aPluginLinkEdit = ''; - $aPluginStatusA = 'minus-circle'; - $enabledStatus = false; - } - - $addon = new AddonsManager(); - //G::pr($addon); - $addon->setAddonId($aPluginId); - $addon->setStoreId($this->getStoreId()); - //Don't trust external data - $addon->setAddonName($aPluginId); - $addon->setAddonDescription($aPluginDescription); - $addon->setAddonNick($aPluginTitle); - $addon->setAddonVersion(""); - $addon->setAddonStatus($aPluginStatusA); - $addon->setAddonType("plugin"); - $addon->setAddonPublisher("Colosa"); - $addon->setAddonDownloadUrl(""); - $addon->setAddonDownloadMd5(""); - $addon->setAddonReleaseDate(null); - $addon->setAddonReleaseType('localRegistry'); - $addon->setAddonReleaseNotes(""); - $addon->setAddonState(""); - - $addon->save(); - - $localPlugins[$aPluginId] = $addon; - } - } - } - } else { - $list = unserialize($pmLicenseManagerO->licensedfeaturesList); - if (is_array($list)) { - foreach ($list['addons'] as $key => $feature) { - $addon = new AddonsManager(); - if ($addon->exists($feature['name'], $feature['guid'])) { - $arrayData['ADDON_ID'] = $feature['name']; - $arrayData['STORE_ID'] = $feature['guid']; - $arrayData['ADDON_NAME'] = $feature['name']; - $arrayData['ADDON_NICK'] = $feature['nick']; - $arrayData['ADDON_DESCRIPTION'] = $feature['description']; - $arrayData['ADDON_STATE'] = ''; - $arrayData['ADDON_STATUS'] = $feature['status']; - $arrayData['ADDON_VERSION'] = ''; - $arrayData['ADDON_TYPE'] = 'features'; - $arrayData['ADDON_PUBLISHER'] = 'Colosa'; - $arrayData['ADDON_RELEASE_DATE'] = null; - $arrayData['ADDON_RELEASE_TYPE'] = 'localRegistry'; - $arrayData['ADDON_RELEASE_NOTES'] = ''; - $arrayData['ADDON_DOWNLOAD_URL'] = ''; - $arrayData['ADDON_DOWNLOAD_MD5'] = ''; - - $addon->update($arrayData); - } else { - $addon->setAddonId($feature['name']); - $addon->setStoreId($feature['guid']); - $addon->setAddonName($feature['name']); - $addon->setAddonDescription($feature['description']); - $addon->setAddonNick($feature['nick']); - $addon->setAddonVersion(""); - $addon->setAddonStatus($feature['status']); - $addon->setAddonType("features"); - $addon->setAddonPublisher("Colosa"); - $addon->setAddonDownloadUrl(""); - $addon->setAddonDownloadMd5(""); - $addon->setAddonReleaseDate(null); - $addon->setAddonReleaseType('localRegistry'); - $addon->setAddonReleaseNotes(""); - $addon->setAddonState(""); - - $addon->save(); - } - } - } - } - - $this->setStoreLastUpdated(time()); - $this->save(); - - $url = $this->getStoreLocation(); - - //Validate url - $licenseInfo = $pmLicenseManagerO->getActiveLicense(); - $licenseId = str_replace('.dat', '', str_replace('license_', '', basename($licenseInfo['LICENSE_PATH']))); - - $url = explode('&', $url); - $url[count($url) - 1] = 'licId=' . urlencode($licenseId); - $url = implode('&', $url); - - if (EnterpriseUtils::getInternetConnection() == 1 && EnterpriseUtils::checkConnectivity($url) == true) { - $option = array( - "http" => array( - "method" => "POST", - "header" => "Content-type: application/x-www-form-urlencoded\r\n", - "content" => http_build_query( - array( - "pmVersion" => System::getVersion(), - "version" => STORE_VERSION - ) - ) - ) - ); - - // Proxy settings - $sysConf = System::getSystemConfiguration(); - if (isset($sysConf['proxy_host'])) { - if ($sysConf['proxy_host'] != '') { - if (!is_array($option['http'])) { - $option['http'] = array(); - } - $option['http']['request_fulluri'] = true; - $option['http']['proxy'] = 'tcp://' . $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''); - if ($sysConf['proxy_user'] != '') { - if (!isset($option['http']['header'])) { - $option['http']['header'] = ''; - } - $option['http']['header'] .= 'Proxy-Authorization: Basic ' . base64_encode($sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : '')); - } - } - } - - $context = stream_context_create($option); - - //This may block for a while, always use AJAX to call this method - $url = $url . '&type=' . strtoupper($type); - $data = file_get_contents($url, false, $context); - - if ($data === false) { - throw new Exception("Could not contact store"); - } - - $serverData = G::json_decode($data); - - //Don't trust external data - if (empty($serverData)) { - throw (new Exception("Store data invalid ('$data')")); - } - - if (isset($serverData->error)) { - throw (new Exception("Store sent us an error: {$serverData->error}")); - } - - if (!isset($serverData->version)) { - throw (new Exception("Store version not found")); - } - - if ($serverData->version != STORE_VERSION) { - throw (new Exception("Store version '{$serverData->version}' unsupported")); - } - - if (!isset($serverData->addons)) { - throw (new Exception("Addons not found on store data")); - } - - $this->clear($type); - - try { - //Add each item to this stores addons - $addons = !is_array($serverData->addons) ? get_object_vars($serverData->addons) : $serverData->addons; - - if (!empty($addons)) { - foreach (get_object_vars($serverData->addons) as $addonId => $addonInfo) { - $addon = new AddonsManager(); - $addon->setAddonId($addonId); - $addon->setStoreId($this->getStoreId()); - //Don't trust external data - $addon->setAddonName(isset($addonInfo->name)? $addonInfo->name : $addonId); - $addon->setAddonDescription(isset($addonInfo->description)? $addonInfo->description : ""); - $addon->setAddonNick(isset($addonInfo->nick)? $addonInfo->nick : ""); - $addon->setAddonVersion(isset($addonInfo->version)? $addonInfo->version : ""); - $addon->setAddonStatus(isset($addonInfo->status)? $addonInfo->status : ""); - $addon->setAddonType(isset($addonInfo->type)? $addonInfo->type : ""); - $addon->setAddonPublisher(isset($addonInfo->publisher)? $addonInfo->publisher : ""); - $workspace = (isset($pmLicenseManagerO->workspace)) ? $pmLicenseManagerO->workspace : 'pmLicenseSrv'; - $addon->setAddonDownloadUrl(isset($addonInfo->download_url)? $addonInfo->download_url : "http://" . $pmLicenseManagerO->server . "/sys".$workspace."/en/green/services/rest?action=getPlugin&OBJ_UID=" . $addonInfo->guid); - $addon->setAddonDownloadMd5(isset($addonInfo->download_md5)? $addonInfo->download_md5 : ""); - $addon->setAddonReleaseDate(isset($addonInfo->release_date)? $addonInfo->release_date : ""); - $addon->setAddonReleaseType(isset($addonInfo->release_type)? $addonInfo->release_type : ''); - $addon->setAddonReleaseNotes(isset($addonInfo->release_notes)? $addonInfo->release_notes : ""); - $addon->setAddonState(""); - - $addon->save(); - - if (isset($localPlugins[$addonId])) { - unset($localPlugins[$addonId]); - } - } - - foreach ($localPlugins as $keyPlugin => $addonA) { - //G::pr($addonA ); - //$addonA->save(); - $addon = new AddonsManager(); - //G::pr($addon); - $addon->setAddonId($addonA->getAddonId()); - $addon->setStoreId($addonA->getStoreId()); - //Don't trust external data - $addon->setAddonName($addonA->getAddonName()); - $addon->setAddonDescription($addonA->getAddonDescription()); - $addon->setAddonNick($addonA->getAddonNick()); - $addon->setAddonVersion(""); - $addon->setAddonStatus($addonA->getAddonStatus()); - $addon->setAddonType($addonA->getAddonType()); - $addon->setAddonPublisher($addonA->getAddonPublisher()); - $addon->setAddonDownloadUrl($addonA->getAddonDownloadUrl()); - $addon->setAddonDownloadMd5($addonA->getAddonDownloadMd5()); - $addon->setAddonReleaseDate(null); - $addon->setAddonReleaseType('localRegistry'); - $addon->setAddonReleaseNotes(""); - $addon->setAddonState(""); - - $addon->save(); - } - } - - $this->setStoreLastUpdated(time()); - $this->save(); - } catch (Exception $e) { - //If we had issues, don't keep only a part of the items - $this->clear($type); - - throw $e; - } - } - - return true; - } -} diff --git a/workflow/engine/classes/model/AddonsStorePeer.php b/workflow/engine/classes/model/AddonsStorePeer.php deleted file mode 100644 index bee770ccf..000000000 --- a/workflow/engine/classes/model/AddonsStorePeer.php +++ /dev/null @@ -1,24 +0,0 @@ -dbMap !== null); - } - - /** - * Gets the databasemap this map builder built. - * - * @return the databasemap - */ - public function getDatabaseMap() - { - return $this->dbMap; - } - - /** - * The doBuild() method builds the DatabaseMap - * - * @return void - * @throws PropelException - */ - public function doBuild() - { - $this->dbMap = Propel::getDatabaseMap('propel'); - $tMap = $this->dbMap->addTable('ADDON_STORE'); - $tMap->setPhpName('AddonStore'); - - $tMap->setUseIdGenerator(false); - $tMap->addPrimaryKey('STORE_ID', 'StoreId', 'string', CreoleTypes::VARCHAR, true, 32); - $tMap->addColumn('STORE_VERSION', 'StoreVersion', 'int', CreoleTypes::INTEGER, false, null); - $tMap->addColumn('STORE_LOCATION', 'StoreLocation', 'string', CreoleTypes::VARCHAR, true, 2048); - $tMap->addColumn('LAST_UPDATED', 'LastUpdated', 'int', CreoleTypes::TIMESTAMP, false, null); - } -} - diff --git a/workflow/engine/classes/model/map/AddonsManagerMapBuilder.php b/workflow/engine/classes/model/map/AddonsManagerMapBuilder.php deleted file mode 100644 index c5ce353f3..000000000 --- a/workflow/engine/classes/model/map/AddonsManagerMapBuilder.php +++ /dev/null @@ -1,106 +0,0 @@ -dbMap !== null); - } - - /** - * Gets the databasemap this map builder built. - * - * @return the databasemap - */ - public function getDatabaseMap() - { - return $this->dbMap; - } - - /** - * The doBuild() method builds the DatabaseMap - * - * @return void - * @throws PropelException - */ - public function doBuild() - { - $this->dbMap = Propel::getDatabaseMap('workflow'); - - $tMap = $this->dbMap->addTable('ADDONS_MANAGER'); - $tMap->setPhpName('AddonsManager'); - - $tMap->setUseIdGenerator(false); - - $tMap->addPrimaryKey('ADDON_ID', 'AddonId', 'string', CreoleTypes::VARCHAR, true, 255); - - $tMap->addPrimaryKey('STORE_ID', 'StoreId', 'string', CreoleTypes::VARCHAR, true, 32); - - $tMap->addColumn('ADDON_NAME', 'AddonName', 'string', CreoleTypes::VARCHAR, true, 255); - - $tMap->addColumn('ADDON_NICK', 'AddonNick', 'string', CreoleTypes::VARCHAR, true, 255); - - $tMap->addColumn('ADDON_DOWNLOAD_FILENAME', 'AddonDownloadFilename', 'string', CreoleTypes::VARCHAR, false, 1024); - - $tMap->addColumn('ADDON_DESCRIPTION', 'AddonDescription', 'string', CreoleTypes::VARCHAR, false, 2048); - - $tMap->addColumn('ADDON_STATE', 'AddonState', 'string', CreoleTypes::VARCHAR, true, 255); - - $tMap->addColumn('ADDON_STATE_CHANGED', 'AddonStateChanged', 'int', CreoleTypes::TIMESTAMP, false, null); - - $tMap->addColumn('ADDON_STATUS', 'AddonStatus', 'string', CreoleTypes::VARCHAR, true, 255); - - $tMap->addColumn('ADDON_VERSION', 'AddonVersion', 'string', CreoleTypes::VARCHAR, true, 255); - - $tMap->addColumn('ADDON_TYPE', 'AddonType', 'string', CreoleTypes::VARCHAR, true, 255); - - $tMap->addColumn('ADDON_PUBLISHER', 'AddonPublisher', 'string', CreoleTypes::VARCHAR, false, 255); - - $tMap->addColumn('ADDON_RELEASE_DATE', 'AddonReleaseDate', 'int', CreoleTypes::TIMESTAMP, false, null); - - $tMap->addColumn('ADDON_RELEASE_TYPE', 'AddonReleaseType', 'string', CreoleTypes::VARCHAR, false, 255); - - $tMap->addColumn('ADDON_RELEASE_NOTES', 'AddonReleaseNotes', 'string', CreoleTypes::VARCHAR, false, 255); - - $tMap->addColumn('ADDON_DOWNLOAD_URL', 'AddonDownloadUrl', 'string', CreoleTypes::VARCHAR, false, 2048); - - $tMap->addColumn('ADDON_DOWNLOAD_PROGRESS', 'AddonDownloadProgress', 'double', CreoleTypes::FLOAT, false, null); - - $tMap->addColumn('ADDON_DOWNLOAD_MD5', 'AddonDownloadMd5', 'string', CreoleTypes::VARCHAR, false, 32); - - } // doBuild() - -} // AddonsManagerMapBuilder diff --git a/workflow/engine/classes/model/map/AddonsStoreMapBuilder.php b/workflow/engine/classes/model/map/AddonsStoreMapBuilder.php deleted file mode 100644 index 93e2733b1..000000000 --- a/workflow/engine/classes/model/map/AddonsStoreMapBuilder.php +++ /dev/null @@ -1,80 +0,0 @@ -dbMap !== null); - } - - /** - * Gets the databasemap this map builder built. - * - * @return the databasemap - */ - public function getDatabaseMap() - { - return $this->dbMap; - } - - /** - * The doBuild() method builds the DatabaseMap - * - * @return void - * @throws PropelException - */ - public function doBuild() - { - $this->dbMap = Propel::getDatabaseMap('workflow'); - - $tMap = $this->dbMap->addTable('ADDONS_STORE'); - $tMap->setPhpName('AddonsStore'); - - $tMap->setUseIdGenerator(false); - - $tMap->addPrimaryKey('STORE_ID', 'StoreId', 'string', CreoleTypes::VARCHAR, true, 32); - - $tMap->addColumn('STORE_VERSION', 'StoreVersion', 'int', CreoleTypes::INTEGER, false, null); - - $tMap->addColumn('STORE_LOCATION', 'StoreLocation', 'string', CreoleTypes::VARCHAR, true, 2048); - - $tMap->addColumn('STORE_TYPE', 'StoreType', 'string', CreoleTypes::VARCHAR, true, 255); - - $tMap->addColumn('STORE_LAST_UPDATED', 'StoreLastUpdated', 'int', CreoleTypes::TIMESTAMP, false, null); - - } // doBuild() - -} // AddonsStoreMapBuilder diff --git a/workflow/engine/classes/model/map/LicenseManagerMapBuilder.php b/workflow/engine/classes/model/map/LicenseManagerMapBuilder.php deleted file mode 100644 index 98c6c8742..000000000 --- a/workflow/engine/classes/model/map/LicenseManagerMapBuilder.php +++ /dev/null @@ -1,90 +0,0 @@ -dbMap !== null); - } - - /** - * Gets the databasemap this map builder built. - * - * @return the databasemap - */ - public function getDatabaseMap() - { - return $this->dbMap; - } - - /** - * The doBuild() method builds the DatabaseMap - * - * @return void - * @throws PropelException - */ - public function doBuild() - { - $this->dbMap = Propel::getDatabaseMap('workflow'); - - $tMap = $this->dbMap->addTable('LICENSE_MANAGER'); - $tMap->setPhpName('LicenseManager'); - - $tMap->setUseIdGenerator(false); - - $tMap->addPrimaryKey('LICENSE_UID', 'LicenseUid', 'string', CreoleTypes::VARCHAR, true, 32); - - $tMap->addColumn('LICENSE_USER', 'LicenseUser', 'string', CreoleTypes::VARCHAR, true, 150); - - $tMap->addColumn('LICENSE_START', 'LicenseStart', 'int', CreoleTypes::INTEGER, true, null); - - $tMap->addColumn('LICENSE_END', 'LicenseEnd', 'int', CreoleTypes::INTEGER, true, null); - - $tMap->addColumn('LICENSE_SPAN', 'LicenseSpan', 'int', CreoleTypes::INTEGER, true, null); - - $tMap->addColumn('LICENSE_STATUS', 'LicenseStatus', 'string', CreoleTypes::VARCHAR, true, 100); - - $tMap->addColumn('LICENSE_DATA', 'LicenseData', 'string', CreoleTypes::LONGVARCHAR, true, null); - - $tMap->addColumn('LICENSE_PATH', 'LicensePath', 'string', CreoleTypes::VARCHAR, true, 255); - - $tMap->addColumn('LICENSE_WORKSPACE', 'LicenseWorkspace', 'string', CreoleTypes::VARCHAR, true, 32); - - $tMap->addColumn('LICENSE_TYPE', 'LicenseType', 'string', CreoleTypes::VARCHAR, true, 32); - - } // doBuild() - -} // LicenseManagerMapBuilder diff --git a/workflow/engine/classes/model/om/BaseAddonsManager.php b/workflow/engine/classes/model/om/BaseAddonsManager.php deleted file mode 100644 index 90b606b0d..000000000 --- a/workflow/engine/classes/model/om/BaseAddonsManager.php +++ /dev/null @@ -1,1558 +0,0 @@ -addon_id; - } - - /** - * Get the [store_id] column value. - * - * @return string - */ - public function getStoreId() - { - - return $this->store_id; - } - - /** - * Get the [addon_name] column value. - * - * @return string - */ - public function getAddonName() - { - - return $this->addon_name; - } - - /** - * Get the [addon_nick] column value. - * - * @return string - */ - public function getAddonNick() - { - - return $this->addon_nick; - } - - /** - * Get the [addon_download_filename] column value. - * - * @return string - */ - public function getAddonDownloadFilename() - { - - return $this->addon_download_filename; - } - - /** - * Get the [addon_description] column value. - * - * @return string - */ - public function getAddonDescription() - { - - return $this->addon_description; - } - - /** - * Get the [addon_state] column value. - * - * @return string - */ - public function getAddonState() - { - - return $this->addon_state; - } - - /** - * Get the [optionally formatted] [addon_state_changed] column value. - * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the integer unix timestamp will be returned. - * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL). - * @throws PropelException - if unable to convert the date/time to timestamp. - */ - public function getAddonStateChanged($format = 'Y-m-d H:i:s') - { - - if ($this->addon_state_changed === null || $this->addon_state_changed === '') { - return null; - } elseif (!is_int($this->addon_state_changed)) { - // a non-timestamp value was set externally, so we convert it - $ts = strtotime($this->addon_state_changed); - if ($ts === -1 || $ts === false) { - throw new PropelException("Unable to parse value of [addon_state_changed] as date/time value: " . - var_export($this->addon_state_changed, true)); - } - } else { - $ts = $this->addon_state_changed; - } - if ($format === null) { - return $ts; - } elseif (strpos($format, '%') !== false) { - return strftime($format, $ts); - } else { - return date($format, $ts); - } - } - - /** - * Get the [addon_status] column value. - * - * @return string - */ - public function getAddonStatus() - { - - return $this->addon_status; - } - - /** - * Get the [addon_version] column value. - * - * @return string - */ - public function getAddonVersion() - { - - return $this->addon_version; - } - - /** - * Get the [addon_type] column value. - * - * @return string - */ - public function getAddonType() - { - - return $this->addon_type; - } - - /** - * Get the [addon_publisher] column value. - * - * @return string - */ - public function getAddonPublisher() - { - - return $this->addon_publisher; - } - - /** - * Get the [optionally formatted] [addon_release_date] column value. - * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the integer unix timestamp will be returned. - * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL). - * @throws PropelException - if unable to convert the date/time to timestamp. - */ - public function getAddonReleaseDate($format = 'Y-m-d H:i:s') - { - - if ($this->addon_release_date === null || $this->addon_release_date === '') { - return null; - } elseif (!is_int($this->addon_release_date)) { - // a non-timestamp value was set externally, so we convert it - $ts = strtotime($this->addon_release_date); - if ($ts === -1 || $ts === false) { - throw new PropelException("Unable to parse value of [addon_release_date] as date/time value: " . - var_export($this->addon_release_date, true)); - } - } else { - $ts = $this->addon_release_date; - } - if ($format === null) { - return $ts; - } elseif (strpos($format, '%') !== false) { - return strftime($format, $ts); - } else { - return date($format, $ts); - } - } - - /** - * Get the [addon_release_type] column value. - * - * @return string - */ - public function getAddonReleaseType() - { - - return $this->addon_release_type; - } - - /** - * Get the [addon_release_notes] column value. - * - * @return string - */ - public function getAddonReleaseNotes() - { - - return $this->addon_release_notes; - } - - /** - * Get the [addon_download_url] column value. - * - * @return string - */ - public function getAddonDownloadUrl() - { - - return $this->addon_download_url; - } - - /** - * Get the [addon_download_progress] column value. - * - * @return double - */ - public function getAddonDownloadProgress() - { - - return $this->addon_download_progress; - } - - /** - * Get the [addon_download_md5] column value. - * - * @return string - */ - public function getAddonDownloadMd5() - { - - return $this->addon_download_md5; - } - - /** - * Set the value of [addon_id] column. - * - * @param string $v new value - * @return void - */ - public function setAddonId($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->addon_id !== $v) { - $this->addon_id = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_ID; - } - - } // setAddonId() - - /** - * Set the value of [store_id] column. - * - * @param string $v new value - * @return void - */ - public function setStoreId($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->store_id !== $v) { - $this->store_id = $v; - $this->modifiedColumns[] = AddonsManagerPeer::STORE_ID; - } - - } // setStoreId() - - /** - * Set the value of [addon_name] column. - * - * @param string $v new value - * @return void - */ - public function setAddonName($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->addon_name !== $v) { - $this->addon_name = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_NAME; - } - - } // setAddonName() - - /** - * Set the value of [addon_nick] column. - * - * @param string $v new value - * @return void - */ - public function setAddonNick($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->addon_nick !== $v) { - $this->addon_nick = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_NICK; - } - - } // setAddonNick() - - /** - * Set the value of [addon_download_filename] column. - * - * @param string $v new value - * @return void - */ - public function setAddonDownloadFilename($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->addon_download_filename !== $v) { - $this->addon_download_filename = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME; - } - - } // setAddonDownloadFilename() - - /** - * Set the value of [addon_description] column. - * - * @param string $v new value - * @return void - */ - public function setAddonDescription($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->addon_description !== $v) { - $this->addon_description = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_DESCRIPTION; - } - - } // setAddonDescription() - - /** - * Set the value of [addon_state] column. - * - * @param string $v new value - * @return void - */ - public function setAddonState($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->addon_state !== $v || $v === '') { - $this->addon_state = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_STATE; - } - - } // setAddonState() - - /** - * Set the value of [addon_state_changed] column. - * - * @param int $v new value - * @return void - */ - public function setAddonStateChanged($v) - { - - if ($v !== null && !is_int($v)) { - $ts = strtotime($v); - //Date/time accepts null values - if ($v == '') { - $ts = null; - } - if ($ts === -1 || $ts === false) { - throw new PropelException("Unable to parse date/time value for [addon_state_changed] from input: " . - var_export($v, true)); - } - } else { - $ts = $v; - } - if ($this->addon_state_changed !== $ts) { - $this->addon_state_changed = $ts; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_STATE_CHANGED; - } - - } // setAddonStateChanged() - - /** - * Set the value of [addon_status] column. - * - * @param string $v new value - * @return void - */ - public function setAddonStatus($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->addon_status !== $v) { - $this->addon_status = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_STATUS; - } - - } // setAddonStatus() - - /** - * Set the value of [addon_version] column. - * - * @param string $v new value - * @return void - */ - public function setAddonVersion($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->addon_version !== $v) { - $this->addon_version = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_VERSION; - } - - } // setAddonVersion() - - /** - * Set the value of [addon_type] column. - * - * @param string $v new value - * @return void - */ - public function setAddonType($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->addon_type !== $v) { - $this->addon_type = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_TYPE; - } - - } // setAddonType() - - /** - * Set the value of [addon_publisher] column. - * - * @param string $v new value - * @return void - */ - public function setAddonPublisher($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->addon_publisher !== $v) { - $this->addon_publisher = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_PUBLISHER; - } - - } // setAddonPublisher() - - /** - * Set the value of [addon_release_date] column. - * - * @param int $v new value - * @return void - */ - public function setAddonReleaseDate($v) - { - - if ($v !== null && !is_int($v)) { - $ts = strtotime($v); - //Date/time accepts null values - if ($v == '') { - $ts = null; - } - if ($ts === -1 || $ts === false) { - throw new PropelException("Unable to parse date/time value for [addon_release_date] from input: " . - var_export($v, true)); - } - } else { - $ts = $v; - } - if ($this->addon_release_date !== $ts) { - $this->addon_release_date = $ts; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_RELEASE_DATE; - } - - } // setAddonReleaseDate() - - /** - * Set the value of [addon_release_type] column. - * - * @param string $v new value - * @return void - */ - public function setAddonReleaseType($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->addon_release_type !== $v) { - $this->addon_release_type = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_RELEASE_TYPE; - } - - } // setAddonReleaseType() - - /** - * Set the value of [addon_release_notes] column. - * - * @param string $v new value - * @return void - */ - public function setAddonReleaseNotes($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->addon_release_notes !== $v) { - $this->addon_release_notes = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_RELEASE_NOTES; - } - - } // setAddonReleaseNotes() - - /** - * Set the value of [addon_download_url] column. - * - * @param string $v new value - * @return void - */ - public function setAddonDownloadUrl($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->addon_download_url !== $v) { - $this->addon_download_url = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_DOWNLOAD_URL; - } - - } // setAddonDownloadUrl() - - /** - * Set the value of [addon_download_progress] column. - * - * @param double $v new value - * @return void - */ - public function setAddonDownloadProgress($v) - { - - if ($this->addon_download_progress !== $v) { - $this->addon_download_progress = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS; - } - - } // setAddonDownloadProgress() - - /** - * Set the value of [addon_download_md5] column. - * - * @param string $v new value - * @return void - */ - public function setAddonDownloadMd5($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->addon_download_md5 !== $v) { - $this->addon_download_md5 = $v; - $this->modifiedColumns[] = AddonsManagerPeer::ADDON_DOWNLOAD_MD5; - } - - } // setAddonDownloadMd5() - - /** - * Hydrates (populates) the object variables with values from the database resultset. - * - * An offset (1-based "start column") is specified so that objects can be hydrated - * with a subset of the columns in the resultset rows. This is needed, for example, - * for results of JOIN queries where the resultset row includes columns from two or - * more tables. - * - * @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos. - * @param int $startcol 1-based offset column which indicates which restultset column to start with. - * @return int next starting column - * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. - */ - public function hydrate(ResultSet $rs, $startcol = 1) - { - try { - - $this->addon_id = $rs->getString($startcol + 0); - - $this->store_id = $rs->getString($startcol + 1); - - $this->addon_name = $rs->getString($startcol + 2); - - $this->addon_nick = $rs->getString($startcol + 3); - - $this->addon_download_filename = $rs->getString($startcol + 4); - - $this->addon_description = $rs->getString($startcol + 5); - - $this->addon_state = $rs->getString($startcol + 6); - - $this->addon_state_changed = $rs->getTimestamp($startcol + 7, null); - - $this->addon_status = $rs->getString($startcol + 8); - - $this->addon_version = $rs->getString($startcol + 9); - - $this->addon_type = $rs->getString($startcol + 10); - - $this->addon_publisher = $rs->getString($startcol + 11); - - $this->addon_release_date = $rs->getTimestamp($startcol + 12, null); - - $this->addon_release_type = $rs->getString($startcol + 13); - - $this->addon_release_notes = $rs->getString($startcol + 14); - - $this->addon_download_url = $rs->getString($startcol + 15); - - $this->addon_download_progress = $rs->getFloat($startcol + 16); - - $this->addon_download_md5 = $rs->getString($startcol + 17); - - $this->resetModified(); - - $this->setNew(false); - - // FIXME - using NUM_COLUMNS may be clearer. - return $startcol + 18; // 18 = AddonsManagerPeer::NUM_COLUMNS - AddonsManagerPeer::NUM_LAZY_LOAD_COLUMNS). - - } catch (Exception $e) { - throw new PropelException("Error populating AddonsManager object", $e); - } - } - - /** - * Removes this object from datastore and sets delete attribute. - * - * @param Connection $con - * @return void - * @throws PropelException - * @see BaseObject::setDeleted() - * @see BaseObject::isDeleted() - */ - public function delete($con = null) - { - if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(AddonsManagerPeer::DATABASE_NAME); - } - - try { - $con->begin(); - AddonsManagerPeer::doDelete($this, $con); - $this->setDeleted(true); - $con->commit(); - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - /** - * Stores the object in the database. If the object is new, - * it inserts it; otherwise an update is performed. This method - * wraps the doSave() worker method in a transaction. - * - * @param Connection $con - * @return int The number of rows affected by this insert/update - * @throws PropelException - * @see doSave() - */ - public function save($con = null) - { - if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(AddonsManagerPeer::DATABASE_NAME); - } - - try { - $con->begin(); - $affectedRows = $this->doSave($con); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - /** - * Stores the object in the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All related objects are also updated in this method. - * - * @param Connection $con - * @return int The number of rows affected by this insert/update and any referring - * @throws PropelException - * @see save() - */ - protected function doSave($con) - { - $affectedRows = 0; // initialize var to track total num of affected rows - if (!$this->alreadyInSave) { - $this->alreadyInSave = true; - - - // If this object has been modified, then save it to the database. - if ($this->isModified()) { - if ($this->isNew()) { - $pk = AddonsManagerPeer::doInsert($this, $con); - $affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which - // should always be true here (even though technically - // BasePeer::doInsert() can insert multiple rows). - - $this->setNew(false); - } else { - $affectedRows += AddonsManagerPeer::doUpdate($this, $con); - } - $this->resetModified(); // [HL] After being saved an object is no longer 'modified' - } - - $this->alreadyInSave = false; - } - return $affectedRows; - } // doSave() - - /** - * Array of ValidationFailed objects. - * @var array ValidationFailed[] - */ - protected $validationFailures = array(); - - /** - * Gets any ValidationFailed objects that resulted from last call to validate(). - * - * - * @return array ValidationFailed[] - * @see validate() - */ - public function getValidationFailures() - { - return $this->validationFailures; - } - - /** - * Validates the objects modified field values and all objects related to this table. - * - * If $columns is either a column name or an array of column names - * only those columns are validated. - * - * @param mixed $columns Column name or an array of column names. - * @return boolean Whether all columns pass validation. - * @see doValidate() - * @see getValidationFailures() - */ - public function validate($columns = null) - { - $res = $this->doValidate($columns); - if ($res === true) { - $this->validationFailures = array(); - return true; - } else { - $this->validationFailures = $res; - return false; - } - } - - /** - * This function performs the validation work for complex object models. - * - * In addition to checking the current object, all related objects will - * also be validated. If all pass then true is returned; otherwise - * an aggreagated array of ValidationFailed objects will be returned. - * - * @param array $columns Array of column names to validate. - * @return mixed true if all validations pass; - array of ValidationFailed objects otherwise. - */ - protected function doValidate($columns = null) - { - if (!$this->alreadyInValidation) { - $this->alreadyInValidation = true; - $retval = null; - - $failureMap = array(); - - - if (($retval = AddonsManagerPeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); - } - - - - $this->alreadyInValidation = false; - } - - return (!empty($failureMap) ? $failureMap : true); - } - - /** - * Retrieves a field from the object by name passed in as a string. - * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return mixed Value of field. - */ - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) - { - $pos = AddonsManagerPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->getByPosition($pos); - } - - /** - * Retrieves a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @return mixed Value of field at $pos - */ - public function getByPosition($pos) - { - switch($pos) { - case 0: - return $this->getAddonId(); - break; - case 1: - return $this->getStoreId(); - break; - case 2: - return $this->getAddonName(); - break; - case 3: - return $this->getAddonNick(); - break; - case 4: - return $this->getAddonDownloadFilename(); - break; - case 5: - return $this->getAddonDescription(); - break; - case 6: - return $this->getAddonState(); - break; - case 7: - return $this->getAddonStateChanged(); - break; - case 8: - return $this->getAddonStatus(); - break; - case 9: - return $this->getAddonVersion(); - break; - case 10: - return $this->getAddonType(); - break; - case 11: - return $this->getAddonPublisher(); - break; - case 12: - return $this->getAddonReleaseDate(); - break; - case 13: - return $this->getAddonReleaseType(); - break; - case 14: - return $this->getAddonReleaseNotes(); - break; - case 15: - return $this->getAddonDownloadUrl(); - break; - case 16: - return $this->getAddonDownloadProgress(); - break; - case 17: - return $this->getAddonDownloadMd5(); - break; - default: - return null; - break; - } // switch() - } - - /** - * Exports the object as an array. - * - * You can specify the key type of the array by passing one of the class - * type constants. - * - * @param string $keyType One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return an associative array containing the field names (as keys) and field values - */ - public function toArray($keyType = BasePeer::TYPE_PHPNAME) - { - $keys = AddonsManagerPeer::getFieldNames($keyType); - $result = array( - $keys[0] => $this->getAddonId(), - $keys[1] => $this->getStoreId(), - $keys[2] => $this->getAddonName(), - $keys[3] => $this->getAddonNick(), - $keys[4] => $this->getAddonDownloadFilename(), - $keys[5] => $this->getAddonDescription(), - $keys[6] => $this->getAddonState(), - $keys[7] => $this->getAddonStateChanged(), - $keys[8] => $this->getAddonStatus(), - $keys[9] => $this->getAddonVersion(), - $keys[10] => $this->getAddonType(), - $keys[11] => $this->getAddonPublisher(), - $keys[12] => $this->getAddonReleaseDate(), - $keys[13] => $this->getAddonReleaseType(), - $keys[14] => $this->getAddonReleaseNotes(), - $keys[15] => $this->getAddonDownloadUrl(), - $keys[16] => $this->getAddonDownloadProgress(), - $keys[17] => $this->getAddonDownloadMd5(), - ); - return $result; - } - - /** - * Sets a field from the object by name passed in as a string. - * - * @param string $name peer name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return void - */ - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) - { - $pos = AddonsManagerPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); - } - - /** - * Sets a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @param mixed $value field value - * @return void - */ - public function setByPosition($pos, $value) - { - switch($pos) { - case 0: - $this->setAddonId($value); - break; - case 1: - $this->setStoreId($value); - break; - case 2: - $this->setAddonName($value); - break; - case 3: - $this->setAddonNick($value); - break; - case 4: - $this->setAddonDownloadFilename($value); - break; - case 5: - $this->setAddonDescription($value); - break; - case 6: - $this->setAddonState($value); - break; - case 7: - $this->setAddonStateChanged($value); - break; - case 8: - $this->setAddonStatus($value); - break; - case 9: - $this->setAddonVersion($value); - break; - case 10: - $this->setAddonType($value); - break; - case 11: - $this->setAddonPublisher($value); - break; - case 12: - $this->setAddonReleaseDate($value); - break; - case 13: - $this->setAddonReleaseType($value); - break; - case 14: - $this->setAddonReleaseNotes($value); - break; - case 15: - $this->setAddonDownloadUrl($value); - break; - case 16: - $this->setAddonDownloadProgress($value); - break; - case 17: - $this->setAddonDownloadMd5($value); - break; - } // switch() - } - - /** - * Populates the object using an array. - * - * This is particularly useful when populating an object from one of the - * request arrays (e.g. $_POST). This method goes through the column - * names, checking to see whether a matching key exists in populated - * array. If so the setByName() method is called for that column. - * - * You can specify the key type of the array by additionally passing one - * of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, - * TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId') - * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. - * @return void - */ - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) - { - $keys = AddonsManagerPeer::getFieldNames($keyType); - - if (array_key_exists($keys[0], $arr)) { - $this->setAddonId($arr[$keys[0]]); - } - - if (array_key_exists($keys[1], $arr)) { - $this->setStoreId($arr[$keys[1]]); - } - - if (array_key_exists($keys[2], $arr)) { - $this->setAddonName($arr[$keys[2]]); - } - - if (array_key_exists($keys[3], $arr)) { - $this->setAddonNick($arr[$keys[3]]); - } - - if (array_key_exists($keys[4], $arr)) { - $this->setAddonDownloadFilename($arr[$keys[4]]); - } - - if (array_key_exists($keys[5], $arr)) { - $this->setAddonDescription($arr[$keys[5]]); - } - - if (array_key_exists($keys[6], $arr)) { - $this->setAddonState($arr[$keys[6]]); - } - - if (array_key_exists($keys[7], $arr)) { - $this->setAddonStateChanged($arr[$keys[7]]); - } - - if (array_key_exists($keys[8], $arr)) { - $this->setAddonStatus($arr[$keys[8]]); - } - - if (array_key_exists($keys[9], $arr)) { - $this->setAddonVersion($arr[$keys[9]]); - } - - if (array_key_exists($keys[10], $arr)) { - $this->setAddonType($arr[$keys[10]]); - } - - if (array_key_exists($keys[11], $arr)) { - $this->setAddonPublisher($arr[$keys[11]]); - } - - if (array_key_exists($keys[12], $arr)) { - $this->setAddonReleaseDate($arr[$keys[12]]); - } - - if (array_key_exists($keys[13], $arr)) { - $this->setAddonReleaseType($arr[$keys[13]]); - } - - if (array_key_exists($keys[14], $arr)) { - $this->setAddonReleaseNotes($arr[$keys[14]]); - } - - if (array_key_exists($keys[15], $arr)) { - $this->setAddonDownloadUrl($arr[$keys[15]]); - } - - if (array_key_exists($keys[16], $arr)) { - $this->setAddonDownloadProgress($arr[$keys[16]]); - } - - if (array_key_exists($keys[17], $arr)) { - $this->setAddonDownloadMd5($arr[$keys[17]]); - } - - } - - /** - * Build a Criteria object containing the values of all modified columns in this object. - * - * @return Criteria The Criteria object containing all modified values. - */ - public function buildCriteria() - { - $criteria = new Criteria(AddonsManagerPeer::DATABASE_NAME); - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_ID)) { - $criteria->add(AddonsManagerPeer::ADDON_ID, $this->addon_id); - } - - if ($this->isColumnModified(AddonsManagerPeer::STORE_ID)) { - $criteria->add(AddonsManagerPeer::STORE_ID, $this->store_id); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_NAME)) { - $criteria->add(AddonsManagerPeer::ADDON_NAME, $this->addon_name); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_NICK)) { - $criteria->add(AddonsManagerPeer::ADDON_NICK, $this->addon_nick); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME)) { - $criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME, $this->addon_download_filename); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_DESCRIPTION)) { - $criteria->add(AddonsManagerPeer::ADDON_DESCRIPTION, $this->addon_description); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_STATE)) { - $criteria->add(AddonsManagerPeer::ADDON_STATE, $this->addon_state); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_STATE_CHANGED)) { - $criteria->add(AddonsManagerPeer::ADDON_STATE_CHANGED, $this->addon_state_changed); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_STATUS)) { - $criteria->add(AddonsManagerPeer::ADDON_STATUS, $this->addon_status); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_VERSION)) { - $criteria->add(AddonsManagerPeer::ADDON_VERSION, $this->addon_version); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_TYPE)) { - $criteria->add(AddonsManagerPeer::ADDON_TYPE, $this->addon_type); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_PUBLISHER)) { - $criteria->add(AddonsManagerPeer::ADDON_PUBLISHER, $this->addon_publisher); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_RELEASE_DATE)) { - $criteria->add(AddonsManagerPeer::ADDON_RELEASE_DATE, $this->addon_release_date); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_RELEASE_TYPE)) { - $criteria->add(AddonsManagerPeer::ADDON_RELEASE_TYPE, $this->addon_release_type); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_RELEASE_NOTES)) { - $criteria->add(AddonsManagerPeer::ADDON_RELEASE_NOTES, $this->addon_release_notes); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_URL)) { - $criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_URL, $this->addon_download_url); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS)) { - $criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS, $this->addon_download_progress); - } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_MD5)) { - $criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_MD5, $this->addon_download_md5); - } - - - return $criteria; - } - - /** - * Builds a Criteria object containing the primary key for this object. - * - * Unlike buildCriteria() this method includes the primary key values regardless - * of whether or not they have been modified. - * - * @return Criteria The Criteria object containing value(s) for primary key(s). - */ - public function buildPkeyCriteria() - { - $criteria = new Criteria(AddonsManagerPeer::DATABASE_NAME); - - $criteria->add(AddonsManagerPeer::ADDON_ID, $this->addon_id); - $criteria->add(AddonsManagerPeer::STORE_ID, $this->store_id); - - return $criteria; - } - - /** - * Returns the composite primary key for this object. - * The array elements will be in same order as specified in XML. - * @return array - */ - public function getPrimaryKey() - { - $pks = array(); - - $pks[0] = $this->getAddonId(); - - $pks[1] = $this->getStoreId(); - - return $pks; - } - - /** - * Set the [composite] primary key. - * - * @param array $keys The elements of the composite key (order must match the order in XML file). - * @return void - */ - public function setPrimaryKey($keys) - { - - $this->setAddonId($keys[0]); - - $this->setStoreId($keys[1]); - - } - - /** - * Sets contents of passed object to values from current object. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param object $copyObj An object of AddonsManager (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @throws PropelException - */ - public function copyInto($copyObj, $deepCopy = false) - { - - $copyObj->setAddonName($this->addon_name); - - $copyObj->setAddonNick($this->addon_nick); - - $copyObj->setAddonDownloadFilename($this->addon_download_filename); - - $copyObj->setAddonDescription($this->addon_description); - - $copyObj->setAddonState($this->addon_state); - - $copyObj->setAddonStateChanged($this->addon_state_changed); - - $copyObj->setAddonStatus($this->addon_status); - - $copyObj->setAddonVersion($this->addon_version); - - $copyObj->setAddonType($this->addon_type); - - $copyObj->setAddonPublisher($this->addon_publisher); - - $copyObj->setAddonReleaseDate($this->addon_release_date); - - $copyObj->setAddonReleaseType($this->addon_release_type); - - $copyObj->setAddonReleaseNotes($this->addon_release_notes); - - $copyObj->setAddonDownloadUrl($this->addon_download_url); - - $copyObj->setAddonDownloadProgress($this->addon_download_progress); - - $copyObj->setAddonDownloadMd5($this->addon_download_md5); - - - $copyObj->setNew(true); - - $copyObj->setAddonId(NULL); // this is a pkey column, so set to default value - - $copyObj->setStoreId(NULL); // this is a pkey column, so set to default value - - } - - /** - * Makes a copy of this object that will be inserted as a new row in table when saved. - * It creates a new object filling in the simple attributes, but skipping any primary - * keys that are defined for the table. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return AddonsManager Clone of current object. - * @throws PropelException - */ - public function copy($deepCopy = false) - { - // we use get_class(), because this might be a subclass - $clazz = get_class($this); - $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); - return $copyObj; - } - - /** - * Returns a peer instance associated with this om. - * - * Since Peer classes are not to have any instance attributes, this method returns the - * same instance for all member of this class. The method could therefore - * be static, but this would prevent one from overriding the behavior. - * - * @return AddonsManagerPeer - */ - public function getPeer() - { - if (self::$peer === null) { - self::$peer = new AddonsManagerPeer(); - } - return self::$peer; - } -} - diff --git a/workflow/engine/classes/model/om/BaseAddonsManagerPeer.php b/workflow/engine/classes/model/om/BaseAddonsManagerPeer.php deleted file mode 100644 index 87373c1e8..000000000 --- a/workflow/engine/classes/model/om/BaseAddonsManagerPeer.php +++ /dev/null @@ -1,642 +0,0 @@ - array ('AddonId', 'StoreId', 'AddonName', 'AddonNick', 'AddonDownloadFilename', 'AddonDescription', 'AddonState', 'AddonStateChanged', 'AddonStatus', 'AddonVersion', 'AddonType', 'AddonPublisher', 'AddonReleaseDate', 'AddonReleaseType', 'AddonReleaseNotes', 'AddonDownloadUrl', 'AddonDownloadProgress', 'AddonDownloadMd5', ), - BasePeer::TYPE_COLNAME => array (AddonsManagerPeer::ADDON_ID, AddonsManagerPeer::STORE_ID, AddonsManagerPeer::ADDON_NAME, AddonsManagerPeer::ADDON_NICK, AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME, AddonsManagerPeer::ADDON_DESCRIPTION, AddonsManagerPeer::ADDON_STATE, AddonsManagerPeer::ADDON_STATE_CHANGED, AddonsManagerPeer::ADDON_STATUS, AddonsManagerPeer::ADDON_VERSION, AddonsManagerPeer::ADDON_TYPE, AddonsManagerPeer::ADDON_PUBLISHER, AddonsManagerPeer::ADDON_RELEASE_DATE, AddonsManagerPeer::ADDON_RELEASE_TYPE, AddonsManagerPeer::ADDON_RELEASE_NOTES, AddonsManagerPeer::ADDON_DOWNLOAD_URL, AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS, AddonsManagerPeer::ADDON_DOWNLOAD_MD5, ), - BasePeer::TYPE_FIELDNAME => array ('ADDON_ID', 'STORE_ID', 'ADDON_NAME', 'ADDON_NICK', 'ADDON_DOWNLOAD_FILENAME', 'ADDON_DESCRIPTION', 'ADDON_STATE', 'ADDON_STATE_CHANGED', 'ADDON_STATUS', 'ADDON_VERSION', 'ADDON_TYPE', 'ADDON_PUBLISHER', 'ADDON_RELEASE_DATE', 'ADDON_RELEASE_TYPE', 'ADDON_RELEASE_NOTES', 'ADDON_DOWNLOAD_URL', 'ADDON_DOWNLOAD_PROGRESS', 'ADDON_DOWNLOAD_MD5', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ) - ); - - /** - * holds an array of keys for quick access to the fieldnames array - * - * first dimension keys are the type constants - * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 - */ - private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('AddonId' => 0, 'StoreId' => 1, 'AddonName' => 2, 'AddonNick' => 3, 'AddonDownloadFilename' => 4, 'AddonDescription' => 5, 'AddonState' => 6, 'AddonStateChanged' => 7, 'AddonStatus' => 8, 'AddonVersion' => 9, 'AddonType' => 10, 'AddonPublisher' => 11, 'AddonReleaseDate' => 12, 'AddonReleaseType' => 13, 'AddonReleaseNotes' => 14, 'AddonDownloadUrl' => 15, 'AddonDownloadProgress' => 16, 'AddonDownloadMd5' => 17, ), - BasePeer::TYPE_COLNAME => array (AddonsManagerPeer::ADDON_ID => 0, AddonsManagerPeer::STORE_ID => 1, AddonsManagerPeer::ADDON_NAME => 2, AddonsManagerPeer::ADDON_NICK => 3, AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME => 4, AddonsManagerPeer::ADDON_DESCRIPTION => 5, AddonsManagerPeer::ADDON_STATE => 6, AddonsManagerPeer::ADDON_STATE_CHANGED => 7, AddonsManagerPeer::ADDON_STATUS => 8, AddonsManagerPeer::ADDON_VERSION => 9, AddonsManagerPeer::ADDON_TYPE => 10, AddonsManagerPeer::ADDON_PUBLISHER => 11, AddonsManagerPeer::ADDON_RELEASE_DATE => 12, AddonsManagerPeer::ADDON_RELEASE_TYPE => 13, AddonsManagerPeer::ADDON_RELEASE_NOTES => 14, AddonsManagerPeer::ADDON_DOWNLOAD_URL => 15, AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS => 16, AddonsManagerPeer::ADDON_DOWNLOAD_MD5 => 17, ), - BasePeer::TYPE_FIELDNAME => array ('ADDON_ID' => 0, 'STORE_ID' => 1, 'ADDON_NAME' => 2, 'ADDON_NICK' => 3, 'ADDON_DOWNLOAD_FILENAME' => 4, 'ADDON_DESCRIPTION' => 5, 'ADDON_STATE' => 6, 'ADDON_STATE_CHANGED' => 7, 'ADDON_STATUS' => 8, 'ADDON_VERSION' => 9, 'ADDON_TYPE' => 10, 'ADDON_PUBLISHER' => 11, 'ADDON_RELEASE_DATE' => 12, 'ADDON_RELEASE_TYPE' => 13, 'ADDON_RELEASE_NOTES' => 14, 'ADDON_DOWNLOAD_URL' => 15, 'ADDON_DOWNLOAD_PROGRESS' => 16, 'ADDON_DOWNLOAD_MD5' => 17, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ) - ); - - /** - * @return MapBuilder the map builder for this peer - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function getMapBuilder() - { - include_once 'classes/model/map/AddonsManagerMapBuilder.php'; - return BasePeer::getMapBuilder('classes.model.map.AddonsManagerMapBuilder'); - } - /** - * Gets a map (hash) of PHP names to DB column names. - * - * @return array The PHP to DB name map for this peer - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this. - */ - public static function getPhpNameMap() - { - if (self::$phpNameMap === null) { - $map = AddonsManagerPeer::getTableMap(); - $columns = $map->getColumns(); - $nameMap = array(); - foreach ($columns as $column) { - $nameMap[$column->getPhpName()] = $column->getColumnName(); - } - self::$phpNameMap = $nameMap; - } - return self::$phpNameMap; - } - /** - * Translates a fieldname to another type - * - * @param string $name field name - * @param string $fromType One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @param string $toType One of the class type constants - * @return string translated name of the field. - */ - static public function translateFieldName($name, $fromType, $toType) - { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; - if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); - } - return $toNames[$key]; - } - - /** - * Returns an array of of field names. - * - * @param string $type The type of fieldnames to return: - * One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return array A list of field names - */ - - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) - { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.'); - } - return self::$fieldNames[$type]; - } - - /** - * Convenience method which changes table.column to alias.column. - * - * Using this method you can maintain SQL abstraction while using column aliases. - * - * $c->addAlias("alias1", TablePeer::TABLE_NAME); - * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); - * - * @param string $alias The alias for the current table. - * @param string $column The column name for current table. (i.e. AddonsManagerPeer::COLUMN_NAME). - * @return string - */ - public static function alias($alias, $column) - { - return str_replace(AddonsManagerPeer::TABLE_NAME.'.', $alias.'.', $column); - } - - /** - * Add all the columns needed to create a new object. - * - * Note: any columns that were marked with lazyLoad="true" in the - * XML schema will not be added to the select list and only loaded - * on demand. - * - * @param criteria object containing the columns to add. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function addSelectColumns(Criteria $criteria) - { - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_ID); - - $criteria->addSelectColumn(AddonsManagerPeer::STORE_ID); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_NAME); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_NICK); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DESCRIPTION); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_STATE); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_STATE_CHANGED); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_STATUS); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_VERSION); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_TYPE); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_PUBLISHER); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_RELEASE_DATE); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_RELEASE_TYPE); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_RELEASE_NOTES); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DOWNLOAD_URL); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS); - - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DOWNLOAD_MD5); - - } - - const COUNT = 'COUNT(ADDONS_MANAGER.ADDON_ID)'; - const COUNT_DISTINCT = 'COUNT(DISTINCT ADDONS_MANAGER.ADDON_ID)'; - - /** - * Returns the number of rows matching criteria. - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria). - * @param Connection $con - * @return int Number of matching rows. - */ - public static function doCount(Criteria $criteria, $distinct = false, $con = null) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // clear out anything that might confuse the ORDER BY clause - $criteria->clearSelectColumns()->clearOrderByColumns(); - if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->addSelectColumn(AddonsManagerPeer::COUNT_DISTINCT); - } else { - $criteria->addSelectColumn(AddonsManagerPeer::COUNT); - } - - // just in case we're grouping: add those columns to the select statement - foreach ($criteria->getGroupByColumns() as $column) { - $criteria->addSelectColumn($column); - } - - $rs = AddonsManagerPeer::doSelectRS($criteria, $con); - if ($rs->next()) { - return $rs->getInt(1); - } else { - // no rows returned; we infer that means 0 matches. - return 0; - } - } - /** - * Method to select one object from the DB. - * - * @param Criteria $criteria object used to create the SELECT statement. - * @param Connection $con - * @return AddonsManager - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectOne(Criteria $criteria, $con = null) - { - $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = AddonsManagerPeer::doSelect($critcopy, $con); - if ($objects) { - return $objects[0]; - } - return null; - } - /** - * Method to do selects. - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param Connection $con - * @return array Array of selected Objects - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelect(Criteria $criteria, $con = null) - { - return AddonsManagerPeer::populateObjects(AddonsManagerPeer::doSelectRS($criteria, $con)); - } - /** - * Prepares the Criteria object and uses the parent doSelect() - * method to get a ResultSet. - * - * Use this method directly if you want to just get the resultset - * (instead of an array of objects). - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param Connection $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return ResultSet The resultset object with numerically-indexed fields. - * @see BasePeer::doSelect() - */ - public static function doSelectRS(Criteria $criteria, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - if (!$criteria->getSelectColumns()) { - $criteria = clone $criteria; - AddonsManagerPeer::addSelectColumns($criteria); - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - // BasePeer returns a Creole ResultSet, set to return - // rows indexed numerically. - return BasePeer::doSelect($criteria, $con); - } - /** - * The returned array will contain objects of the default type or - * objects that inherit from the default. - * - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function populateObjects(ResultSet $rs) - { - $results = array(); - - // set the class once to avoid overhead in the loop - $cls = AddonsManagerPeer::getOMClass(); - $cls = Propel::import($cls); - // populate the object(s) - while ($rs->next()) { - - $obj = new $cls(); - $obj->hydrate($rs); - $results[] = $obj; - - } - return $results; - } - /** - * Returns the TableMap related to this peer. - * This method is not needed for general use but a specific application could have a need. - * @return TableMap - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function getTableMap() - { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); - } - - /** - * The class that the Peer will make instances of. - * - * This uses a dot-path notation which is tranalted into a path - * relative to a location on the PHP include_path. - * (e.g. path.to.MyClass -> 'path/to/MyClass.php') - * - * @return string path.to.ClassName - */ - public static function getOMClass() - { - return AddonsManagerPeer::CLASS_DEFAULT; - } - - /** - * Method perform an INSERT on the database, given a AddonsManager or Criteria object. - * - * @param mixed $values Criteria or AddonsManager object containing data that is used to create the INSERT statement. - * @param Connection $con the connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doInsert($values, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - } else { - $criteria = $values->buildCriteria(); // build Criteria from AddonsManager object - } - - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - try { - // use transaction because $criteria could contain info - // for more than one table (I guess, conceivably) - $con->begin(); - $pk = BasePeer::doInsert($criteria, $con); - $con->commit(); - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - - return $pk; - } - - /** - * Method perform an UPDATE on the database, given a AddonsManager or Criteria object. - * - * @param mixed $values Criteria or AddonsManager object containing data create the UPDATE statement. - * @param Connection $con The connection to use (specify Connection exert more control over transactions). - * @return int The number of affected rows (if supported by underlying database driver). - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doUpdate($values, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - $selectCriteria = new Criteria(self::DATABASE_NAME); - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - - $comparison = $criteria->getComparison(AddonsManagerPeer::ADDON_ID); - $selectCriteria->add(AddonsManagerPeer::ADDON_ID, $criteria->remove(AddonsManagerPeer::ADDON_ID), $comparison); - - $comparison = $criteria->getComparison(AddonsManagerPeer::STORE_ID); - $selectCriteria->add(AddonsManagerPeer::STORE_ID, $criteria->remove(AddonsManagerPeer::STORE_ID), $comparison); - - } else { - $criteria = $values->buildCriteria(); // gets full criteria - $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) - } - - // set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - return BasePeer::doUpdate($selectCriteria, $criteria, $con); - } - - /** - * Method to DELETE all rows from the ADDONS_MANAGER table. - * - * @return int The number of affected rows (if supported by underlying database driver). - */ - public static function doDeleteAll($con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - $affectedRows = 0; // initialize var to track total num of affected rows - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->begin(); - $affectedRows += BasePeer::doDeleteAll(AddonsManagerPeer::TABLE_NAME, $con); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - /** - * Method perform a DELETE on the database, given a AddonsManager or Criteria object OR a primary key value. - * - * @param mixed $values Criteria or AddonsManager object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param Connection $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). - * This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doDelete($values, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(AddonsManagerPeer::DATABASE_NAME); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - } elseif ($values instanceof AddonsManager) { - - $criteria = $values->buildPkeyCriteria(); - } else { - // it must be the primary key - $criteria = new Criteria(self::DATABASE_NAME); - // primary key is composite; we therefore, expect - // the primary key passed to be an array of pkey - // values - if (count($values) == count($values, COUNT_RECURSIVE)) { - // array is not multi-dimensional - $values = array($values); - } - $vals = array(); - foreach ($values as $value) { - - $vals[0][] = $value[0]; - $vals[1][] = $value[1]; - } - - $criteria->add(AddonsManagerPeer::ADDON_ID, $vals[0], Criteria::IN); - $criteria->add(AddonsManagerPeer::STORE_ID, $vals[1], Criteria::IN); - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - $affectedRows = 0; // initialize var to track total num of affected rows - - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->begin(); - - $affectedRows += BasePeer::doDelete($criteria, $con); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - /** - * Validates all modified columns of given AddonsManager object. - * If parameter $columns is either a single column name or an array of column names - * than only those columns are validated. - * - * NOTICE: This does not apply to primary or foreign keys for now. - * - * @param AddonsManager $obj The object to validate. - * @param mixed $cols Column name or array of column names. - * - * @return mixed TRUE if all columns are valid or the error message of the first invalid column. - */ - public static function doValidate(AddonsManager $obj, $cols = null) - { - $columns = array(); - - if ($cols) { - $dbMap = Propel::getDatabaseMap(AddonsManagerPeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(AddonsManagerPeer::TABLE_NAME); - - if (! is_array($cols)) { - $cols = array($cols); - } - - foreach ($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); - $columns[$colName] = $obj->$get(); - } - } - } else { - - } - - return BasePeer::doValidate(AddonsManagerPeer::DATABASE_NAME, AddonsManagerPeer::TABLE_NAME, $columns); - } - - /** - * Retrieve object using using composite pkey values. - * @param string $addon_id - * @param string $store_id - * @param Connection $con - * @return AddonsManager - */ - public static function retrieveByPK($addon_id, $store_id, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - $criteria = new Criteria(); - $criteria->add(AddonsManagerPeer::ADDON_ID, $addon_id); - $criteria->add(AddonsManagerPeer::STORE_ID, $store_id); - $v = AddonsManagerPeer::doSelect($criteria, $con); - - return !empty($v) ? $v[0] : null; - } -} - - -// static code to register the map builder for this Peer with the main Propel class -if (Propel::isInit()) { - // the MapBuilder classes register themselves with Propel during initialization - // so we need to load them here. - try { - BaseAddonsManagerPeer::getMapBuilder(); - } catch (Exception $e) { - Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR); - } -} else { - // even if Propel is not yet initialized, the map builder class can be registered - // now and then it will be loaded when Propel initializes. - require_once 'classes/model/map/AddonsManagerMapBuilder.php'; - Propel::registerMapBuilder('classes.model.map.AddonsManagerMapBuilder'); -} - diff --git a/workflow/engine/classes/model/om/BaseAddonsStore.php b/workflow/engine/classes/model/om/BaseAddonsStore.php deleted file mode 100644 index c4db74be5..000000000 --- a/workflow/engine/classes/model/om/BaseAddonsStore.php +++ /dev/null @@ -1,770 +0,0 @@ -store_id; - } - - /** - * Get the [store_version] column value. - * - * @return int - */ - public function getStoreVersion() - { - - return $this->store_version; - } - - /** - * Get the [store_location] column value. - * - * @return string - */ - public function getStoreLocation() - { - - return $this->store_location; - } - - /** - * Get the [store_type] column value. - * - * @return string - */ - public function getStoreType() - { - - return $this->store_type; - } - - /** - * Get the [optionally formatted] [store_last_updated] column value. - * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the integer unix timestamp will be returned. - * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL). - * @throws PropelException - if unable to convert the date/time to timestamp. - */ - public function getStoreLastUpdated($format = 'Y-m-d H:i:s') - { - - if ($this->store_last_updated === null || $this->store_last_updated === '') { - return null; - } elseif (!is_int($this->store_last_updated)) { - // a non-timestamp value was set externally, so we convert it - $ts = strtotime($this->store_last_updated); - if ($ts === -1 || $ts === false) { - throw new PropelException("Unable to parse value of [store_last_updated] as date/time value: " . - var_export($this->store_last_updated, true)); - } - } else { - $ts = $this->store_last_updated; - } - if ($format === null) { - return $ts; - } elseif (strpos($format, '%') !== false) { - return strftime($format, $ts); - } else { - return date($format, $ts); - } - } - - /** - * Set the value of [store_id] column. - * - * @param string $v new value - * @return void - */ - public function setStoreId($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->store_id !== $v) { - $this->store_id = $v; - $this->modifiedColumns[] = AddonsStorePeer::STORE_ID; - } - - } // setStoreId() - - /** - * Set the value of [store_version] column. - * - * @param int $v new value - * @return void - */ - public function setStoreVersion($v) - { - - // Since the native PHP type for this column is integer, - // we will cast the input value to an int (if it is not). - if ($v !== null && !is_int($v) && is_numeric($v)) { - $v = (int) $v; - } - - if ($this->store_version !== $v) { - $this->store_version = $v; - $this->modifiedColumns[] = AddonsStorePeer::STORE_VERSION; - } - - } // setStoreVersion() - - /** - * Set the value of [store_location] column. - * - * @param string $v new value - * @return void - */ - public function setStoreLocation($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->store_location !== $v) { - $this->store_location = $v; - $this->modifiedColumns[] = AddonsStorePeer::STORE_LOCATION; - } - - } // setStoreLocation() - - /** - * Set the value of [store_type] column. - * - * @param string $v new value - * @return void - */ - public function setStoreType($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->store_type !== $v) { - $this->store_type = $v; - $this->modifiedColumns[] = AddonsStorePeer::STORE_TYPE; - } - - } // setStoreType() - - /** - * Set the value of [store_last_updated] column. - * - * @param int $v new value - * @return void - */ - public function setStoreLastUpdated($v) - { - - if ($v !== null && !is_int($v)) { - $ts = strtotime($v); - //Date/time accepts null values - if ($v == '') { - $ts = null; - } - if ($ts === -1 || $ts === false) { - throw new PropelException("Unable to parse date/time value for [store_last_updated] from input: " . - var_export($v, true)); - } - } else { - $ts = $v; - } - if ($this->store_last_updated !== $ts) { - $this->store_last_updated = $ts; - $this->modifiedColumns[] = AddonsStorePeer::STORE_LAST_UPDATED; - } - - } // setStoreLastUpdated() - - /** - * Hydrates (populates) the object variables with values from the database resultset. - * - * An offset (1-based "start column") is specified so that objects can be hydrated - * with a subset of the columns in the resultset rows. This is needed, for example, - * for results of JOIN queries where the resultset row includes columns from two or - * more tables. - * - * @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos. - * @param int $startcol 1-based offset column which indicates which restultset column to start with. - * @return int next starting column - * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. - */ - public function hydrate(ResultSet $rs, $startcol = 1) - { - try { - - $this->store_id = $rs->getString($startcol + 0); - - $this->store_version = $rs->getInt($startcol + 1); - - $this->store_location = $rs->getString($startcol + 2); - - $this->store_type = $rs->getString($startcol + 3); - - $this->store_last_updated = $rs->getTimestamp($startcol + 4, null); - - $this->resetModified(); - - $this->setNew(false); - - // FIXME - using NUM_COLUMNS may be clearer. - return $startcol + 5; // 5 = AddonsStorePeer::NUM_COLUMNS - AddonsStorePeer::NUM_LAZY_LOAD_COLUMNS). - - } catch (Exception $e) { - throw new PropelException("Error populating AddonsStore object", $e); - } - } - - /** - * Removes this object from datastore and sets delete attribute. - * - * @param Connection $con - * @return void - * @throws PropelException - * @see BaseObject::setDeleted() - * @see BaseObject::isDeleted() - */ - public function delete($con = null) - { - if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(AddonsStorePeer::DATABASE_NAME); - } - - try { - $con->begin(); - AddonsStorePeer::doDelete($this, $con); - $this->setDeleted(true); - $con->commit(); - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - /** - * Stores the object in the database. If the object is new, - * it inserts it; otherwise an update is performed. This method - * wraps the doSave() worker method in a transaction. - * - * @param Connection $con - * @return int The number of rows affected by this insert/update - * @throws PropelException - * @see doSave() - */ - public function save($con = null) - { - if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(AddonsStorePeer::DATABASE_NAME); - } - - try { - $con->begin(); - $affectedRows = $this->doSave($con); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - /** - * Stores the object in the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All related objects are also updated in this method. - * - * @param Connection $con - * @return int The number of rows affected by this insert/update and any referring - * @throws PropelException - * @see save() - */ - protected function doSave($con) - { - $affectedRows = 0; // initialize var to track total num of affected rows - if (!$this->alreadyInSave) { - $this->alreadyInSave = true; - - - // If this object has been modified, then save it to the database. - if ($this->isModified()) { - if ($this->isNew()) { - $pk = AddonsStorePeer::doInsert($this, $con); - $affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which - // should always be true here (even though technically - // BasePeer::doInsert() can insert multiple rows). - - $this->setNew(false); - } else { - $affectedRows += AddonsStorePeer::doUpdate($this, $con); - } - $this->resetModified(); // [HL] After being saved an object is no longer 'modified' - } - - $this->alreadyInSave = false; - } - return $affectedRows; - } // doSave() - - /** - * Array of ValidationFailed objects. - * @var array ValidationFailed[] - */ - protected $validationFailures = array(); - - /** - * Gets any ValidationFailed objects that resulted from last call to validate(). - * - * - * @return array ValidationFailed[] - * @see validate() - */ - public function getValidationFailures() - { - return $this->validationFailures; - } - - /** - * Validates the objects modified field values and all objects related to this table. - * - * If $columns is either a column name or an array of column names - * only those columns are validated. - * - * @param mixed $columns Column name or an array of column names. - * @return boolean Whether all columns pass validation. - * @see doValidate() - * @see getValidationFailures() - */ - public function validate($columns = null) - { - $res = $this->doValidate($columns); - if ($res === true) { - $this->validationFailures = array(); - return true; - } else { - $this->validationFailures = $res; - return false; - } - } - - /** - * This function performs the validation work for complex object models. - * - * In addition to checking the current object, all related objects will - * also be validated. If all pass then true is returned; otherwise - * an aggreagated array of ValidationFailed objects will be returned. - * - * @param array $columns Array of column names to validate. - * @return mixed true if all validations pass; - array of ValidationFailed objects otherwise. - */ - protected function doValidate($columns = null) - { - if (!$this->alreadyInValidation) { - $this->alreadyInValidation = true; - $retval = null; - - $failureMap = array(); - - - if (($retval = AddonsStorePeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); - } - - - - $this->alreadyInValidation = false; - } - - return (!empty($failureMap) ? $failureMap : true); - } - - /** - * Retrieves a field from the object by name passed in as a string. - * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return mixed Value of field. - */ - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) - { - $pos = AddonsStorePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->getByPosition($pos); - } - - /** - * Retrieves a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @return mixed Value of field at $pos - */ - public function getByPosition($pos) - { - switch($pos) { - case 0: - return $this->getStoreId(); - break; - case 1: - return $this->getStoreVersion(); - break; - case 2: - return $this->getStoreLocation(); - break; - case 3: - return $this->getStoreType(); - break; - case 4: - return $this->getStoreLastUpdated(); - break; - default: - return null; - break; - } // switch() - } - - /** - * Exports the object as an array. - * - * You can specify the key type of the array by passing one of the class - * type constants. - * - * @param string $keyType One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return an associative array containing the field names (as keys) and field values - */ - public function toArray($keyType = BasePeer::TYPE_PHPNAME) - { - $keys = AddonsStorePeer::getFieldNames($keyType); - $result = array( - $keys[0] => $this->getStoreId(), - $keys[1] => $this->getStoreVersion(), - $keys[2] => $this->getStoreLocation(), - $keys[3] => $this->getStoreType(), - $keys[4] => $this->getStoreLastUpdated(), - ); - return $result; - } - - /** - * Sets a field from the object by name passed in as a string. - * - * @param string $name peer name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return void - */ - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) - { - $pos = AddonsStorePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); - } - - /** - * Sets a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @param mixed $value field value - * @return void - */ - public function setByPosition($pos, $value) - { - switch($pos) { - case 0: - $this->setStoreId($value); - break; - case 1: - $this->setStoreVersion($value); - break; - case 2: - $this->setStoreLocation($value); - break; - case 3: - $this->setStoreType($value); - break; - case 4: - $this->setStoreLastUpdated($value); - break; - } // switch() - } - - /** - * Populates the object using an array. - * - * This is particularly useful when populating an object from one of the - * request arrays (e.g. $_POST). This method goes through the column - * names, checking to see whether a matching key exists in populated - * array. If so the setByName() method is called for that column. - * - * You can specify the key type of the array by additionally passing one - * of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, - * TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId') - * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. - * @return void - */ - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) - { - $keys = AddonsStorePeer::getFieldNames($keyType); - - if (array_key_exists($keys[0], $arr)) { - $this->setStoreId($arr[$keys[0]]); - } - - if (array_key_exists($keys[1], $arr)) { - $this->setStoreVersion($arr[$keys[1]]); - } - - if (array_key_exists($keys[2], $arr)) { - $this->setStoreLocation($arr[$keys[2]]); - } - - if (array_key_exists($keys[3], $arr)) { - $this->setStoreType($arr[$keys[3]]); - } - - if (array_key_exists($keys[4], $arr)) { - $this->setStoreLastUpdated($arr[$keys[4]]); - } - - } - - /** - * Build a Criteria object containing the values of all modified columns in this object. - * - * @return Criteria The Criteria object containing all modified values. - */ - public function buildCriteria() - { - $criteria = new Criteria(AddonsStorePeer::DATABASE_NAME); - - if ($this->isColumnModified(AddonsStorePeer::STORE_ID)) { - $criteria->add(AddonsStorePeer::STORE_ID, $this->store_id); - } - - if ($this->isColumnModified(AddonsStorePeer::STORE_VERSION)) { - $criteria->add(AddonsStorePeer::STORE_VERSION, $this->store_version); - } - - if ($this->isColumnModified(AddonsStorePeer::STORE_LOCATION)) { - $criteria->add(AddonsStorePeer::STORE_LOCATION, $this->store_location); - } - - if ($this->isColumnModified(AddonsStorePeer::STORE_TYPE)) { - $criteria->add(AddonsStorePeer::STORE_TYPE, $this->store_type); - } - - if ($this->isColumnModified(AddonsStorePeer::STORE_LAST_UPDATED)) { - $criteria->add(AddonsStorePeer::STORE_LAST_UPDATED, $this->store_last_updated); - } - - - return $criteria; - } - - /** - * Builds a Criteria object containing the primary key for this object. - * - * Unlike buildCriteria() this method includes the primary key values regardless - * of whether or not they have been modified. - * - * @return Criteria The Criteria object containing value(s) for primary key(s). - */ - public function buildPkeyCriteria() - { - $criteria = new Criteria(AddonsStorePeer::DATABASE_NAME); - - $criteria->add(AddonsStorePeer::STORE_ID, $this->store_id); - - return $criteria; - } - - /** - * Returns the primary key for this object (row). - * @return string - */ - public function getPrimaryKey() - { - return $this->getStoreId(); - } - - /** - * Generic method to set the primary key (store_id column). - * - * @param string $key Primary key. - * @return void - */ - public function setPrimaryKey($key) - { - $this->setStoreId($key); - } - - /** - * Sets contents of passed object to values from current object. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param object $copyObj An object of AddonsStore (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @throws PropelException - */ - public function copyInto($copyObj, $deepCopy = false) - { - - $copyObj->setStoreVersion($this->store_version); - - $copyObj->setStoreLocation($this->store_location); - - $copyObj->setStoreType($this->store_type); - - $copyObj->setStoreLastUpdated($this->store_last_updated); - - - $copyObj->setNew(true); - - $copyObj->setStoreId(NULL); // this is a pkey column, so set to default value - - } - - /** - * Makes a copy of this object that will be inserted as a new row in table when saved. - * It creates a new object filling in the simple attributes, but skipping any primary - * keys that are defined for the table. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return AddonsStore Clone of current object. - * @throws PropelException - */ - public function copy($deepCopy = false) - { - // we use get_class(), because this might be a subclass - $clazz = get_class($this); - $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); - return $copyObj; - } - - /** - * Returns a peer instance associated with this om. - * - * Since Peer classes are not to have any instance attributes, this method returns the - * same instance for all member of this class. The method could therefore - * be static, but this would prevent one from overriding the behavior. - * - * @return AddonsStorePeer - */ - public function getPeer() - { - if (self::$peer === null) { - self::$peer = new AddonsStorePeer(); - } - return self::$peer; - } -} - diff --git a/workflow/engine/classes/model/om/BaseAddonsStorePeer.php b/workflow/engine/classes/model/om/BaseAddonsStorePeer.php deleted file mode 100644 index 3e8962d13..000000000 --- a/workflow/engine/classes/model/om/BaseAddonsStorePeer.php +++ /dev/null @@ -1,587 +0,0 @@ - array ('StoreId', 'StoreVersion', 'StoreLocation', 'StoreType', 'StoreLastUpdated', ), - BasePeer::TYPE_COLNAME => array (AddonsStorePeer::STORE_ID, AddonsStorePeer::STORE_VERSION, AddonsStorePeer::STORE_LOCATION, AddonsStorePeer::STORE_TYPE, AddonsStorePeer::STORE_LAST_UPDATED, ), - BasePeer::TYPE_FIELDNAME => array ('STORE_ID', 'STORE_VERSION', 'STORE_LOCATION', 'STORE_TYPE', 'STORE_LAST_UPDATED', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) - ); - - /** - * holds an array of keys for quick access to the fieldnames array - * - * first dimension keys are the type constants - * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 - */ - private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('StoreId' => 0, 'StoreVersion' => 1, 'StoreLocation' => 2, 'StoreType' => 3, 'StoreLastUpdated' => 4, ), - BasePeer::TYPE_COLNAME => array (AddonsStorePeer::STORE_ID => 0, AddonsStorePeer::STORE_VERSION => 1, AddonsStorePeer::STORE_LOCATION => 2, AddonsStorePeer::STORE_TYPE => 3, AddonsStorePeer::STORE_LAST_UPDATED => 4, ), - BasePeer::TYPE_FIELDNAME => array ('STORE_ID' => 0, 'STORE_VERSION' => 1, 'STORE_LOCATION' => 2, 'STORE_TYPE' => 3, 'STORE_LAST_UPDATED' => 4, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) - ); - - /** - * @return MapBuilder the map builder for this peer - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function getMapBuilder() - { - include_once 'classes/model/map/AddonsStoreMapBuilder.php'; - return BasePeer::getMapBuilder('classes.model.map.AddonsStoreMapBuilder'); - } - /** - * Gets a map (hash) of PHP names to DB column names. - * - * @return array The PHP to DB name map for this peer - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this. - */ - public static function getPhpNameMap() - { - if (self::$phpNameMap === null) { - $map = AddonsStorePeer::getTableMap(); - $columns = $map->getColumns(); - $nameMap = array(); - foreach ($columns as $column) { - $nameMap[$column->getPhpName()] = $column->getColumnName(); - } - self::$phpNameMap = $nameMap; - } - return self::$phpNameMap; - } - /** - * Translates a fieldname to another type - * - * @param string $name field name - * @param string $fromType One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @param string $toType One of the class type constants - * @return string translated name of the field. - */ - static public function translateFieldName($name, $fromType, $toType) - { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; - if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); - } - return $toNames[$key]; - } - - /** - * Returns an array of of field names. - * - * @param string $type The type of fieldnames to return: - * One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return array A list of field names - */ - - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) - { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.'); - } - return self::$fieldNames[$type]; - } - - /** - * Convenience method which changes table.column to alias.column. - * - * Using this method you can maintain SQL abstraction while using column aliases. - * - * $c->addAlias("alias1", TablePeer::TABLE_NAME); - * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); - * - * @param string $alias The alias for the current table. - * @param string $column The column name for current table. (i.e. AddonsStorePeer::COLUMN_NAME). - * @return string - */ - public static function alias($alias, $column) - { - return str_replace(AddonsStorePeer::TABLE_NAME.'.', $alias.'.', $column); - } - - /** - * Add all the columns needed to create a new object. - * - * Note: any columns that were marked with lazyLoad="true" in the - * XML schema will not be added to the select list and only loaded - * on demand. - * - * @param criteria object containing the columns to add. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function addSelectColumns(Criteria $criteria) - { - - $criteria->addSelectColumn(AddonsStorePeer::STORE_ID); - - $criteria->addSelectColumn(AddonsStorePeer::STORE_VERSION); - - $criteria->addSelectColumn(AddonsStorePeer::STORE_LOCATION); - - $criteria->addSelectColumn(AddonsStorePeer::STORE_TYPE); - - $criteria->addSelectColumn(AddonsStorePeer::STORE_LAST_UPDATED); - - } - - const COUNT = 'COUNT(ADDONS_STORE.STORE_ID)'; - const COUNT_DISTINCT = 'COUNT(DISTINCT ADDONS_STORE.STORE_ID)'; - - /** - * Returns the number of rows matching criteria. - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria). - * @param Connection $con - * @return int Number of matching rows. - */ - public static function doCount(Criteria $criteria, $distinct = false, $con = null) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // clear out anything that might confuse the ORDER BY clause - $criteria->clearSelectColumns()->clearOrderByColumns(); - if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->addSelectColumn(AddonsStorePeer::COUNT_DISTINCT); - } else { - $criteria->addSelectColumn(AddonsStorePeer::COUNT); - } - - // just in case we're grouping: add those columns to the select statement - foreach ($criteria->getGroupByColumns() as $column) { - $criteria->addSelectColumn($column); - } - - $rs = AddonsStorePeer::doSelectRS($criteria, $con); - if ($rs->next()) { - return $rs->getInt(1); - } else { - // no rows returned; we infer that means 0 matches. - return 0; - } - } - /** - * Method to select one object from the DB. - * - * @param Criteria $criteria object used to create the SELECT statement. - * @param Connection $con - * @return AddonsStore - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectOne(Criteria $criteria, $con = null) - { - $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = AddonsStorePeer::doSelect($critcopy, $con); - if ($objects) { - return $objects[0]; - } - return null; - } - /** - * Method to do selects. - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param Connection $con - * @return array Array of selected Objects - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelect(Criteria $criteria, $con = null) - { - return AddonsStorePeer::populateObjects(AddonsStorePeer::doSelectRS($criteria, $con)); - } - /** - * Prepares the Criteria object and uses the parent doSelect() - * method to get a ResultSet. - * - * Use this method directly if you want to just get the resultset - * (instead of an array of objects). - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param Connection $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return ResultSet The resultset object with numerically-indexed fields. - * @see BasePeer::doSelect() - */ - public static function doSelectRS(Criteria $criteria, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - if (!$criteria->getSelectColumns()) { - $criteria = clone $criteria; - AddonsStorePeer::addSelectColumns($criteria); - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - // BasePeer returns a Creole ResultSet, set to return - // rows indexed numerically. - return BasePeer::doSelect($criteria, $con); - } - /** - * The returned array will contain objects of the default type or - * objects that inherit from the default. - * - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function populateObjects(ResultSet $rs) - { - $results = array(); - - // set the class once to avoid overhead in the loop - $cls = AddonsStorePeer::getOMClass(); - $cls = Propel::import($cls); - // populate the object(s) - while ($rs->next()) { - - $obj = new $cls(); - $obj->hydrate($rs); - $results[] = $obj; - - } - return $results; - } - /** - * Returns the TableMap related to this peer. - * This method is not needed for general use but a specific application could have a need. - * @return TableMap - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function getTableMap() - { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); - } - - /** - * The class that the Peer will make instances of. - * - * This uses a dot-path notation which is tranalted into a path - * relative to a location on the PHP include_path. - * (e.g. path.to.MyClass -> 'path/to/MyClass.php') - * - * @return string path.to.ClassName - */ - public static function getOMClass() - { - return AddonsStorePeer::CLASS_DEFAULT; - } - - /** - * Method perform an INSERT on the database, given a AddonsStore or Criteria object. - * - * @param mixed $values Criteria or AddonsStore object containing data that is used to create the INSERT statement. - * @param Connection $con the connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doInsert($values, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - } else { - $criteria = $values->buildCriteria(); // build Criteria from AddonsStore object - } - - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - try { - // use transaction because $criteria could contain info - // for more than one table (I guess, conceivably) - $con->begin(); - $pk = BasePeer::doInsert($criteria, $con); - $con->commit(); - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - - return $pk; - } - - /** - * Method perform an UPDATE on the database, given a AddonsStore or Criteria object. - * - * @param mixed $values Criteria or AddonsStore object containing data create the UPDATE statement. - * @param Connection $con The connection to use (specify Connection exert more control over transactions). - * @return int The number of affected rows (if supported by underlying database driver). - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doUpdate($values, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - $selectCriteria = new Criteria(self::DATABASE_NAME); - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - - $comparison = $criteria->getComparison(AddonsStorePeer::STORE_ID); - $selectCriteria->add(AddonsStorePeer::STORE_ID, $criteria->remove(AddonsStorePeer::STORE_ID), $comparison); - - } else { - $criteria = $values->buildCriteria(); // gets full criteria - $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) - } - - // set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - return BasePeer::doUpdate($selectCriteria, $criteria, $con); - } - - /** - * Method to DELETE all rows from the ADDONS_STORE table. - * - * @return int The number of affected rows (if supported by underlying database driver). - */ - public static function doDeleteAll($con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - $affectedRows = 0; // initialize var to track total num of affected rows - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->begin(); - $affectedRows += BasePeer::doDeleteAll(AddonsStorePeer::TABLE_NAME, $con); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - /** - * Method perform a DELETE on the database, given a AddonsStore or Criteria object OR a primary key value. - * - * @param mixed $values Criteria or AddonsStore object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param Connection $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). - * This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doDelete($values, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(AddonsStorePeer::DATABASE_NAME); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - } elseif ($values instanceof AddonsStore) { - - $criteria = $values->buildPkeyCriteria(); - } else { - // it must be the primary key - $criteria = new Criteria(self::DATABASE_NAME); - $criteria->add(AddonsStorePeer::STORE_ID, (array) $values, Criteria::IN); - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - $affectedRows = 0; // initialize var to track total num of affected rows - - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->begin(); - - $affectedRows += BasePeer::doDelete($criteria, $con); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - /** - * Validates all modified columns of given AddonsStore object. - * If parameter $columns is either a single column name or an array of column names - * than only those columns are validated. - * - * NOTICE: This does not apply to primary or foreign keys for now. - * - * @param AddonsStore $obj The object to validate. - * @param mixed $cols Column name or array of column names. - * - * @return mixed TRUE if all columns are valid or the error message of the first invalid column. - */ - public static function doValidate(AddonsStore $obj, $cols = null) - { - $columns = array(); - - if ($cols) { - $dbMap = Propel::getDatabaseMap(AddonsStorePeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(AddonsStorePeer::TABLE_NAME); - - if (! is_array($cols)) { - $cols = array($cols); - } - - foreach ($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); - $columns[$colName] = $obj->$get(); - } - } - } else { - - } - - return BasePeer::doValidate(AddonsStorePeer::DATABASE_NAME, AddonsStorePeer::TABLE_NAME, $columns); - } - - /** - * Retrieve a single object by pkey. - * - * @param mixed $pk the primary key. - * @param Connection $con the connection to use - * @return AddonsStore - */ - public static function retrieveByPK($pk, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - $criteria = new Criteria(AddonsStorePeer::DATABASE_NAME); - - $criteria->add(AddonsStorePeer::STORE_ID, $pk); - - - $v = AddonsStorePeer::doSelect($criteria, $con); - - return !empty($v) > 0 ? $v[0] : null; - } - - /** - * Retrieve multiple objects by pkey. - * - * @param array $pks List of primary keys - * @param Connection $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function retrieveByPKs($pks, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - $objs = null; - if (empty($pks)) { - $objs = array(); - } else { - $criteria = new Criteria(); - $criteria->add(AddonsStorePeer::STORE_ID, $pks, Criteria::IN); - $objs = AddonsStorePeer::doSelect($criteria, $con); - } - return $objs; - } -} - - -// static code to register the map builder for this Peer with the main Propel class -if (Propel::isInit()) { - // the MapBuilder classes register themselves with Propel during initialization - // so we need to load them here. - try { - BaseAddonsStorePeer::getMapBuilder(); - } catch (Exception $e) { - Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR); - } -} else { - // even if Propel is not yet initialized, the map builder class can be registered - // now and then it will be loaded when Propel initializes. - require_once 'classes/model/map/AddonsStoreMapBuilder.php'; - Propel::registerMapBuilder('classes.model.map.AddonsStoreMapBuilder'); -} - diff --git a/workflow/engine/classes/model/om/BaseLicenseManager.php b/workflow/engine/classes/model/om/BaseLicenseManager.php deleted file mode 100644 index 8a00d54e5..000000000 --- a/workflow/engine/classes/model/om/BaseLicenseManager.php +++ /dev/null @@ -1,1032 +0,0 @@ -license_uid; - } - - /** - * Get the [license_user] column value. - * - * @return string - */ - public function getLicenseUser() - { - - return $this->license_user; - } - - /** - * Get the [license_start] column value. - * - * @return int - */ - public function getLicenseStart() - { - - return $this->license_start; - } - - /** - * Get the [license_end] column value. - * - * @return int - */ - public function getLicenseEnd() - { - - return $this->license_end; - } - - /** - * Get the [license_span] column value. - * - * @return int - */ - public function getLicenseSpan() - { - - return $this->license_span; - } - - /** - * Get the [license_status] column value. - * - * @return string - */ - public function getLicenseStatus() - { - - return $this->license_status; - } - - /** - * Get the [license_data] column value. - * - * @return string - */ - public function getLicenseData() - { - - return $this->license_data; - } - - /** - * Get the [license_path] column value. - * - * @return string - */ - public function getLicensePath() - { - - return $this->license_path; - } - - /** - * Get the [license_workspace] column value. - * - * @return string - */ - public function getLicenseWorkspace() - { - - return $this->license_workspace; - } - - /** - * Get the [license_type] column value. - * - * @return string - */ - public function getLicenseType() - { - - return $this->license_type; - } - - /** - * Set the value of [license_uid] column. - * - * @param string $v new value - * @return void - */ - public function setLicenseUid($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->license_uid !== $v) { - $this->license_uid = $v; - $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_UID; - } - - } // setLicenseUid() - - /** - * Set the value of [license_user] column. - * - * @param string $v new value - * @return void - */ - public function setLicenseUser($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->license_user !== $v || $v === '0') { - $this->license_user = $v; - $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_USER; - } - - } // setLicenseUser() - - /** - * Set the value of [license_start] column. - * - * @param int $v new value - * @return void - */ - public function setLicenseStart($v) - { - - // Since the native PHP type for this column is integer, - // we will cast the input value to an int (if it is not). - if ($v !== null && !is_int($v) && is_numeric($v)) { - $v = (int) $v; - } - - if ($this->license_start !== $v || $v === 0) { - $this->license_start = $v; - $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_START; - } - - } // setLicenseStart() - - /** - * Set the value of [license_end] column. - * - * @param int $v new value - * @return void - */ - public function setLicenseEnd($v) - { - - // Since the native PHP type for this column is integer, - // we will cast the input value to an int (if it is not). - if ($v !== null && !is_int($v) && is_numeric($v)) { - $v = (int) $v; - } - - if ($this->license_end !== $v || $v === 0) { - $this->license_end = $v; - $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_END; - } - - } // setLicenseEnd() - - /** - * Set the value of [license_span] column. - * - * @param int $v new value - * @return void - */ - public function setLicenseSpan($v) - { - - // Since the native PHP type for this column is integer, - // we will cast the input value to an int (if it is not). - if ($v !== null && !is_int($v) && is_numeric($v)) { - $v = (int) $v; - } - - if ($this->license_span !== $v || $v === 0) { - $this->license_span = $v; - $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_SPAN; - } - - } // setLicenseSpan() - - /** - * Set the value of [license_status] column. - * - * @param string $v new value - * @return void - */ - public function setLicenseStatus($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->license_status !== $v || $v === '') { - $this->license_status = $v; - $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_STATUS; - } - - } // setLicenseStatus() - - /** - * Set the value of [license_data] column. - * - * @param string $v new value - * @return void - */ - public function setLicenseData($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->license_data !== $v) { - $this->license_data = $v; - $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_DATA; - } - - } // setLicenseData() - - /** - * Set the value of [license_path] column. - * - * @param string $v new value - * @return void - */ - public function setLicensePath($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->license_path !== $v || $v === '0') { - $this->license_path = $v; - $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_PATH; - } - - } // setLicensePath() - - /** - * Set the value of [license_workspace] column. - * - * @param string $v new value - * @return void - */ - public function setLicenseWorkspace($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->license_workspace !== $v || $v === '0') { - $this->license_workspace = $v; - $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_WORKSPACE; - } - - } // setLicenseWorkspace() - - /** - * Set the value of [license_type] column. - * - * @param string $v new value - * @return void - */ - public function setLicenseType($v) - { - - // Since the native PHP type for this column is string, - // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { - $v = (string) $v; - } - - if ($this->license_type !== $v || $v === '0') { - $this->license_type = $v; - $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_TYPE; - } - - } // setLicenseType() - - /** - * Hydrates (populates) the object variables with values from the database resultset. - * - * An offset (1-based "start column") is specified so that objects can be hydrated - * with a subset of the columns in the resultset rows. This is needed, for example, - * for results of JOIN queries where the resultset row includes columns from two or - * more tables. - * - * @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos. - * @param int $startcol 1-based offset column which indicates which restultset column to start with. - * @return int next starting column - * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. - */ - public function hydrate(ResultSet $rs, $startcol = 1) - { - try { - - $this->license_uid = $rs->getString($startcol + 0); - - $this->license_user = $rs->getString($startcol + 1); - - $this->license_start = $rs->getInt($startcol + 2); - - $this->license_end = $rs->getInt($startcol + 3); - - $this->license_span = $rs->getInt($startcol + 4); - - $this->license_status = $rs->getString($startcol + 5); - - $this->license_data = $rs->getString($startcol + 6); - - $this->license_path = $rs->getString($startcol + 7); - - $this->license_workspace = $rs->getString($startcol + 8); - - $this->license_type = $rs->getString($startcol + 9); - - $this->resetModified(); - - $this->setNew(false); - - // FIXME - using NUM_COLUMNS may be clearer. - return $startcol + 10; // 10 = LicenseManagerPeer::NUM_COLUMNS - LicenseManagerPeer::NUM_LAZY_LOAD_COLUMNS). - - } catch (Exception $e) { - throw new PropelException("Error populating LicenseManager object", $e); - } - } - - /** - * Removes this object from datastore and sets delete attribute. - * - * @param Connection $con - * @return void - * @throws PropelException - * @see BaseObject::setDeleted() - * @see BaseObject::isDeleted() - */ - public function delete($con = null) - { - if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(LicenseManagerPeer::DATABASE_NAME); - } - - try { - $con->begin(); - LicenseManagerPeer::doDelete($this, $con); - $this->setDeleted(true); - $con->commit(); - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - /** - * Stores the object in the database. If the object is new, - * it inserts it; otherwise an update is performed. This method - * wraps the doSave() worker method in a transaction. - * - * @param Connection $con - * @return int The number of rows affected by this insert/update - * @throws PropelException - * @see doSave() - */ - public function save($con = null) - { - if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(LicenseManagerPeer::DATABASE_NAME); - } - - try { - $con->begin(); - $affectedRows = $this->doSave($con); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - /** - * Stores the object in the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All related objects are also updated in this method. - * - * @param Connection $con - * @return int The number of rows affected by this insert/update and any referring - * @throws PropelException - * @see save() - */ - protected function doSave($con) - { - $affectedRows = 0; // initialize var to track total num of affected rows - if (!$this->alreadyInSave) { - $this->alreadyInSave = true; - - - // If this object has been modified, then save it to the database. - if ($this->isModified()) { - if ($this->isNew()) { - $pk = LicenseManagerPeer::doInsert($this, $con); - $affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which - // should always be true here (even though technically - // BasePeer::doInsert() can insert multiple rows). - - $this->setNew(false); - } else { - $affectedRows += LicenseManagerPeer::doUpdate($this, $con); - } - $this->resetModified(); // [HL] After being saved an object is no longer 'modified' - } - - $this->alreadyInSave = false; - } - return $affectedRows; - } // doSave() - - /** - * Array of ValidationFailed objects. - * @var array ValidationFailed[] - */ - protected $validationFailures = array(); - - /** - * Gets any ValidationFailed objects that resulted from last call to validate(). - * - * - * @return array ValidationFailed[] - * @see validate() - */ - public function getValidationFailures() - { - return $this->validationFailures; - } - - /** - * Validates the objects modified field values and all objects related to this table. - * - * If $columns is either a column name or an array of column names - * only those columns are validated. - * - * @param mixed $columns Column name or an array of column names. - * @return boolean Whether all columns pass validation. - * @see doValidate() - * @see getValidationFailures() - */ - public function validate($columns = null) - { - $res = $this->doValidate($columns); - if ($res === true) { - $this->validationFailures = array(); - return true; - } else { - $this->validationFailures = $res; - return false; - } - } - - /** - * This function performs the validation work for complex object models. - * - * In addition to checking the current object, all related objects will - * also be validated. If all pass then true is returned; otherwise - * an aggreagated array of ValidationFailed objects will be returned. - * - * @param array $columns Array of column names to validate. - * @return mixed true if all validations pass; - array of ValidationFailed objects otherwise. - */ - protected function doValidate($columns = null) - { - if (!$this->alreadyInValidation) { - $this->alreadyInValidation = true; - $retval = null; - - $failureMap = array(); - - - if (($retval = LicenseManagerPeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); - } - - - - $this->alreadyInValidation = false; - } - - return (!empty($failureMap) ? $failureMap : true); - } - - /** - * Retrieves a field from the object by name passed in as a string. - * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return mixed Value of field. - */ - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) - { - $pos = LicenseManagerPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->getByPosition($pos); - } - - /** - * Retrieves a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @return mixed Value of field at $pos - */ - public function getByPosition($pos) - { - switch($pos) { - case 0: - return $this->getLicenseUid(); - break; - case 1: - return $this->getLicenseUser(); - break; - case 2: - return $this->getLicenseStart(); - break; - case 3: - return $this->getLicenseEnd(); - break; - case 4: - return $this->getLicenseSpan(); - break; - case 5: - return $this->getLicenseStatus(); - break; - case 6: - return $this->getLicenseData(); - break; - case 7: - return $this->getLicensePath(); - break; - case 8: - return $this->getLicenseWorkspace(); - break; - case 9: - return $this->getLicenseType(); - break; - default: - return null; - break; - } // switch() - } - - /** - * Exports the object as an array. - * - * You can specify the key type of the array by passing one of the class - * type constants. - * - * @param string $keyType One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return an associative array containing the field names (as keys) and field values - */ - public function toArray($keyType = BasePeer::TYPE_PHPNAME) - { - $keys = LicenseManagerPeer::getFieldNames($keyType); - $result = array( - $keys[0] => $this->getLicenseUid(), - $keys[1] => $this->getLicenseUser(), - $keys[2] => $this->getLicenseStart(), - $keys[3] => $this->getLicenseEnd(), - $keys[4] => $this->getLicenseSpan(), - $keys[5] => $this->getLicenseStatus(), - $keys[6] => $this->getLicenseData(), - $keys[7] => $this->getLicensePath(), - $keys[8] => $this->getLicenseWorkspace(), - $keys[9] => $this->getLicenseType(), - ); - return $result; - } - - /** - * Sets a field from the object by name passed in as a string. - * - * @param string $name peer name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return void - */ - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) - { - $pos = LicenseManagerPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); - } - - /** - * Sets a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @param mixed $value field value - * @return void - */ - public function setByPosition($pos, $value) - { - switch($pos) { - case 0: - $this->setLicenseUid($value); - break; - case 1: - $this->setLicenseUser($value); - break; - case 2: - $this->setLicenseStart($value); - break; - case 3: - $this->setLicenseEnd($value); - break; - case 4: - $this->setLicenseSpan($value); - break; - case 5: - $this->setLicenseStatus($value); - break; - case 6: - $this->setLicenseData($value); - break; - case 7: - $this->setLicensePath($value); - break; - case 8: - $this->setLicenseWorkspace($value); - break; - case 9: - $this->setLicenseType($value); - break; - } // switch() - } - - /** - * Populates the object using an array. - * - * This is particularly useful when populating an object from one of the - * request arrays (e.g. $_POST). This method goes through the column - * names, checking to see whether a matching key exists in populated - * array. If so the setByName() method is called for that column. - * - * You can specify the key type of the array by additionally passing one - * of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, - * TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId') - * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. - * @return void - */ - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) - { - $keys = LicenseManagerPeer::getFieldNames($keyType); - - if (array_key_exists($keys[0], $arr)) { - $this->setLicenseUid($arr[$keys[0]]); - } - - if (array_key_exists($keys[1], $arr)) { - $this->setLicenseUser($arr[$keys[1]]); - } - - if (array_key_exists($keys[2], $arr)) { - $this->setLicenseStart($arr[$keys[2]]); - } - - if (array_key_exists($keys[3], $arr)) { - $this->setLicenseEnd($arr[$keys[3]]); - } - - if (array_key_exists($keys[4], $arr)) { - $this->setLicenseSpan($arr[$keys[4]]); - } - - if (array_key_exists($keys[5], $arr)) { - $this->setLicenseStatus($arr[$keys[5]]); - } - - if (array_key_exists($keys[6], $arr)) { - $this->setLicenseData($arr[$keys[6]]); - } - - if (array_key_exists($keys[7], $arr)) { - $this->setLicensePath($arr[$keys[7]]); - } - - if (array_key_exists($keys[8], $arr)) { - $this->setLicenseWorkspace($arr[$keys[8]]); - } - - if (array_key_exists($keys[9], $arr)) { - $this->setLicenseType($arr[$keys[9]]); - } - - } - - /** - * Build a Criteria object containing the values of all modified columns in this object. - * - * @return Criteria The Criteria object containing all modified values. - */ - public function buildCriteria() - { - $criteria = new Criteria(LicenseManagerPeer::DATABASE_NAME); - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_UID)) { - $criteria->add(LicenseManagerPeer::LICENSE_UID, $this->license_uid); - } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_USER)) { - $criteria->add(LicenseManagerPeer::LICENSE_USER, $this->license_user); - } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_START)) { - $criteria->add(LicenseManagerPeer::LICENSE_START, $this->license_start); - } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_END)) { - $criteria->add(LicenseManagerPeer::LICENSE_END, $this->license_end); - } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_SPAN)) { - $criteria->add(LicenseManagerPeer::LICENSE_SPAN, $this->license_span); - } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_STATUS)) { - $criteria->add(LicenseManagerPeer::LICENSE_STATUS, $this->license_status); - } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_DATA)) { - $criteria->add(LicenseManagerPeer::LICENSE_DATA, $this->license_data); - } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_PATH)) { - $criteria->add(LicenseManagerPeer::LICENSE_PATH, $this->license_path); - } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_WORKSPACE)) { - $criteria->add(LicenseManagerPeer::LICENSE_WORKSPACE, $this->license_workspace); - } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_TYPE)) { - $criteria->add(LicenseManagerPeer::LICENSE_TYPE, $this->license_type); - } - - - return $criteria; - } - - /** - * Builds a Criteria object containing the primary key for this object. - * - * Unlike buildCriteria() this method includes the primary key values regardless - * of whether or not they have been modified. - * - * @return Criteria The Criteria object containing value(s) for primary key(s). - */ - public function buildPkeyCriteria() - { - $criteria = new Criteria(LicenseManagerPeer::DATABASE_NAME); - - $criteria->add(LicenseManagerPeer::LICENSE_UID, $this->license_uid); - - return $criteria; - } - - /** - * Returns the primary key for this object (row). - * @return string - */ - public function getPrimaryKey() - { - return $this->getLicenseUid(); - } - - /** - * Generic method to set the primary key (license_uid column). - * - * @param string $key Primary key. - * @return void - */ - public function setPrimaryKey($key) - { - $this->setLicenseUid($key); - } - - /** - * Sets contents of passed object to values from current object. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param object $copyObj An object of LicenseManager (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @throws PropelException - */ - public function copyInto($copyObj, $deepCopy = false) - { - - $copyObj->setLicenseUser($this->license_user); - - $copyObj->setLicenseStart($this->license_start); - - $copyObj->setLicenseEnd($this->license_end); - - $copyObj->setLicenseSpan($this->license_span); - - $copyObj->setLicenseStatus($this->license_status); - - $copyObj->setLicenseData($this->license_data); - - $copyObj->setLicensePath($this->license_path); - - $copyObj->setLicenseWorkspace($this->license_workspace); - - $copyObj->setLicenseType($this->license_type); - - - $copyObj->setNew(true); - - $copyObj->setLicenseUid(NULL); // this is a pkey column, so set to default value - - } - - /** - * Makes a copy of this object that will be inserted as a new row in table when saved. - * It creates a new object filling in the simple attributes, but skipping any primary - * keys that are defined for the table. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return LicenseManager Clone of current object. - * @throws PropelException - */ - public function copy($deepCopy = false) - { - // we use get_class(), because this might be a subclass - $clazz = get_class($this); - $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); - return $copyObj; - } - - /** - * Returns a peer instance associated with this om. - * - * Since Peer classes are not to have any instance attributes, this method returns the - * same instance for all member of this class. The method could therefore - * be static, but this would prevent one from overriding the behavior. - * - * @return LicenseManagerPeer - */ - public function getPeer() - { - if (self::$peer === null) { - self::$peer = new LicenseManagerPeer(); - } - return self::$peer; - } -} - diff --git a/workflow/engine/classes/model/om/BaseLicenseManagerPeer.php b/workflow/engine/classes/model/om/BaseLicenseManagerPeer.php deleted file mode 100644 index 6af8fe358..000000000 --- a/workflow/engine/classes/model/om/BaseLicenseManagerPeer.php +++ /dev/null @@ -1,612 +0,0 @@ - array ('LicenseUid', 'LicenseUser', 'LicenseStart', 'LicenseEnd', 'LicenseSpan', 'LicenseStatus', 'LicenseData', 'LicensePath', 'LicenseWorkspace', 'LicenseType', ), - BasePeer::TYPE_COLNAME => array (LicenseManagerPeer::LICENSE_UID, LicenseManagerPeer::LICENSE_USER, LicenseManagerPeer::LICENSE_START, LicenseManagerPeer::LICENSE_END, LicenseManagerPeer::LICENSE_SPAN, LicenseManagerPeer::LICENSE_STATUS, LicenseManagerPeer::LICENSE_DATA, LicenseManagerPeer::LICENSE_PATH, LicenseManagerPeer::LICENSE_WORKSPACE, LicenseManagerPeer::LICENSE_TYPE, ), - BasePeer::TYPE_FIELDNAME => array ('LICENSE_UID', 'LICENSE_USER', 'LICENSE_START', 'LICENSE_END', 'LICENSE_SPAN', 'LICENSE_STATUS', 'LICENSE_DATA', 'LICENSE_PATH', 'LICENSE_WORKSPACE', 'LICENSE_TYPE', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ) - ); - - /** - * holds an array of keys for quick access to the fieldnames array - * - * first dimension keys are the type constants - * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 - */ - private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('LicenseUid' => 0, 'LicenseUser' => 1, 'LicenseStart' => 2, 'LicenseEnd' => 3, 'LicenseSpan' => 4, 'LicenseStatus' => 5, 'LicenseData' => 6, 'LicensePath' => 7, 'LicenseWorkspace' => 8, 'LicenseType' => 9, ), - BasePeer::TYPE_COLNAME => array (LicenseManagerPeer::LICENSE_UID => 0, LicenseManagerPeer::LICENSE_USER => 1, LicenseManagerPeer::LICENSE_START => 2, LicenseManagerPeer::LICENSE_END => 3, LicenseManagerPeer::LICENSE_SPAN => 4, LicenseManagerPeer::LICENSE_STATUS => 5, LicenseManagerPeer::LICENSE_DATA => 6, LicenseManagerPeer::LICENSE_PATH => 7, LicenseManagerPeer::LICENSE_WORKSPACE => 8, LicenseManagerPeer::LICENSE_TYPE => 9, ), - BasePeer::TYPE_FIELDNAME => array ('LICENSE_UID' => 0, 'LICENSE_USER' => 1, 'LICENSE_START' => 2, 'LICENSE_END' => 3, 'LICENSE_SPAN' => 4, 'LICENSE_STATUS' => 5, 'LICENSE_DATA' => 6, 'LICENSE_PATH' => 7, 'LICENSE_WORKSPACE' => 8, 'LICENSE_TYPE' => 9, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ) - ); - - /** - * @return MapBuilder the map builder for this peer - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function getMapBuilder() - { - include_once 'classes/model/map/LicenseManagerMapBuilder.php'; - return BasePeer::getMapBuilder('classes.model.map.LicenseManagerMapBuilder'); - } - /** - * Gets a map (hash) of PHP names to DB column names. - * - * @return array The PHP to DB name map for this peer - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this. - */ - public static function getPhpNameMap() - { - if (self::$phpNameMap === null) { - $map = LicenseManagerPeer::getTableMap(); - $columns = $map->getColumns(); - $nameMap = array(); - foreach ($columns as $column) { - $nameMap[$column->getPhpName()] = $column->getColumnName(); - } - self::$phpNameMap = $nameMap; - } - return self::$phpNameMap; - } - /** - * Translates a fieldname to another type - * - * @param string $name field name - * @param string $fromType One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @param string $toType One of the class type constants - * @return string translated name of the field. - */ - static public function translateFieldName($name, $fromType, $toType) - { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; - if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); - } - return $toNames[$key]; - } - - /** - * Returns an array of of field names. - * - * @param string $type The type of fieldnames to return: - * One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return array A list of field names - */ - - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) - { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.'); - } - return self::$fieldNames[$type]; - } - - /** - * Convenience method which changes table.column to alias.column. - * - * Using this method you can maintain SQL abstraction while using column aliases. - * - * $c->addAlias("alias1", TablePeer::TABLE_NAME); - * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); - * - * @param string $alias The alias for the current table. - * @param string $column The column name for current table. (i.e. LicenseManagerPeer::COLUMN_NAME). - * @return string - */ - public static function alias($alias, $column) - { - return str_replace(LicenseManagerPeer::TABLE_NAME.'.', $alias.'.', $column); - } - - /** - * Add all the columns needed to create a new object. - * - * Note: any columns that were marked with lazyLoad="true" in the - * XML schema will not be added to the select list and only loaded - * on demand. - * - * @param criteria object containing the columns to add. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function addSelectColumns(Criteria $criteria) - { - - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_UID); - - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_USER); - - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_START); - - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_END); - - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_SPAN); - - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_STATUS); - - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_DATA); - - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_PATH); - - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_WORKSPACE); - - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_TYPE); - - } - - const COUNT = 'COUNT(LICENSE_MANAGER.LICENSE_UID)'; - const COUNT_DISTINCT = 'COUNT(DISTINCT LICENSE_MANAGER.LICENSE_UID)'; - - /** - * Returns the number of rows matching criteria. - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria). - * @param Connection $con - * @return int Number of matching rows. - */ - public static function doCount(Criteria $criteria, $distinct = false, $con = null) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // clear out anything that might confuse the ORDER BY clause - $criteria->clearSelectColumns()->clearOrderByColumns(); - if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->addSelectColumn(LicenseManagerPeer::COUNT_DISTINCT); - } else { - $criteria->addSelectColumn(LicenseManagerPeer::COUNT); - } - - // just in case we're grouping: add those columns to the select statement - foreach ($criteria->getGroupByColumns() as $column) { - $criteria->addSelectColumn($column); - } - - $rs = LicenseManagerPeer::doSelectRS($criteria, $con); - if ($rs->next()) { - return $rs->getInt(1); - } else { - // no rows returned; we infer that means 0 matches. - return 0; - } - } - /** - * Method to select one object from the DB. - * - * @param Criteria $criteria object used to create the SELECT statement. - * @param Connection $con - * @return LicenseManager - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectOne(Criteria $criteria, $con = null) - { - $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = LicenseManagerPeer::doSelect($critcopy, $con); - if ($objects) { - return $objects[0]; - } - return null; - } - /** - * Method to do selects. - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param Connection $con - * @return array Array of selected Objects - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelect(Criteria $criteria, $con = null) - { - return LicenseManagerPeer::populateObjects(LicenseManagerPeer::doSelectRS($criteria, $con)); - } - /** - * Prepares the Criteria object and uses the parent doSelect() - * method to get a ResultSet. - * - * Use this method directly if you want to just get the resultset - * (instead of an array of objects). - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param Connection $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return ResultSet The resultset object with numerically-indexed fields. - * @see BasePeer::doSelect() - */ - public static function doSelectRS(Criteria $criteria, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - if (!$criteria->getSelectColumns()) { - $criteria = clone $criteria; - LicenseManagerPeer::addSelectColumns($criteria); - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - // BasePeer returns a Creole ResultSet, set to return - // rows indexed numerically. - return BasePeer::doSelect($criteria, $con); - } - /** - * The returned array will contain objects of the default type or - * objects that inherit from the default. - * - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function populateObjects(ResultSet $rs) - { - $results = array(); - - // set the class once to avoid overhead in the loop - $cls = LicenseManagerPeer::getOMClass(); - $cls = Propel::import($cls); - // populate the object(s) - while ($rs->next()) { - - $obj = new $cls(); - $obj->hydrate($rs); - $results[] = $obj; - - } - return $results; - } - /** - * Returns the TableMap related to this peer. - * This method is not needed for general use but a specific application could have a need. - * @return TableMap - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function getTableMap() - { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); - } - - /** - * The class that the Peer will make instances of. - * - * This uses a dot-path notation which is tranalted into a path - * relative to a location on the PHP include_path. - * (e.g. path.to.MyClass -> 'path/to/MyClass.php') - * - * @return string path.to.ClassName - */ - public static function getOMClass() - { - return LicenseManagerPeer::CLASS_DEFAULT; - } - - /** - * Method perform an INSERT on the database, given a LicenseManager or Criteria object. - * - * @param mixed $values Criteria or LicenseManager object containing data that is used to create the INSERT statement. - * @param Connection $con the connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doInsert($values, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - } else { - $criteria = $values->buildCriteria(); // build Criteria from LicenseManager object - } - - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - try { - // use transaction because $criteria could contain info - // for more than one table (I guess, conceivably) - $con->begin(); - $pk = BasePeer::doInsert($criteria, $con); - $con->commit(); - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - - return $pk; - } - - /** - * Method perform an UPDATE on the database, given a LicenseManager or Criteria object. - * - * @param mixed $values Criteria or LicenseManager object containing data create the UPDATE statement. - * @param Connection $con The connection to use (specify Connection exert more control over transactions). - * @return int The number of affected rows (if supported by underlying database driver). - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doUpdate($values, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - $selectCriteria = new Criteria(self::DATABASE_NAME); - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - - $comparison = $criteria->getComparison(LicenseManagerPeer::LICENSE_UID); - $selectCriteria->add(LicenseManagerPeer::LICENSE_UID, $criteria->remove(LicenseManagerPeer::LICENSE_UID), $comparison); - - } else { - $criteria = $values->buildCriteria(); // gets full criteria - $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) - } - - // set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - return BasePeer::doUpdate($selectCriteria, $criteria, $con); - } - - /** - * Method to DELETE all rows from the LICENSE_MANAGER table. - * - * @return int The number of affected rows (if supported by underlying database driver). - */ - public static function doDeleteAll($con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - $affectedRows = 0; // initialize var to track total num of affected rows - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->begin(); - $affectedRows += BasePeer::doDeleteAll(LicenseManagerPeer::TABLE_NAME, $con); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - /** - * Method perform a DELETE on the database, given a LicenseManager or Criteria object OR a primary key value. - * - * @param mixed $values Criteria or LicenseManager object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param Connection $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). - * This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doDelete($values, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(LicenseManagerPeer::DATABASE_NAME); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - } elseif ($values instanceof LicenseManager) { - - $criteria = $values->buildPkeyCriteria(); - } else { - // it must be the primary key - $criteria = new Criteria(self::DATABASE_NAME); - $criteria->add(LicenseManagerPeer::LICENSE_UID, (array) $values, Criteria::IN); - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - $affectedRows = 0; // initialize var to track total num of affected rows - - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->begin(); - - $affectedRows += BasePeer::doDelete($criteria, $con); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - /** - * Validates all modified columns of given LicenseManager object. - * If parameter $columns is either a single column name or an array of column names - * than only those columns are validated. - * - * NOTICE: This does not apply to primary or foreign keys for now. - * - * @param LicenseManager $obj The object to validate. - * @param mixed $cols Column name or array of column names. - * - * @return mixed TRUE if all columns are valid or the error message of the first invalid column. - */ - public static function doValidate(LicenseManager $obj, $cols = null) - { - $columns = array(); - - if ($cols) { - $dbMap = Propel::getDatabaseMap(LicenseManagerPeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(LicenseManagerPeer::TABLE_NAME); - - if (! is_array($cols)) { - $cols = array($cols); - } - - foreach ($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); - $columns[$colName] = $obj->$get(); - } - } - } else { - - } - - return BasePeer::doValidate(LicenseManagerPeer::DATABASE_NAME, LicenseManagerPeer::TABLE_NAME, $columns); - } - - /** - * Retrieve a single object by pkey. - * - * @param mixed $pk the primary key. - * @param Connection $con the connection to use - * @return LicenseManager - */ - public static function retrieveByPK($pk, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - $criteria = new Criteria(LicenseManagerPeer::DATABASE_NAME); - - $criteria->add(LicenseManagerPeer::LICENSE_UID, $pk); - - - $v = LicenseManagerPeer::doSelect($criteria, $con); - - return !empty($v) > 0 ? $v[0] : null; - } - - /** - * Retrieve multiple objects by pkey. - * - * @param array $pks List of primary keys - * @param Connection $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function retrieveByPKs($pks, $con = null) - { - if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); - } - - $objs = null; - if (empty($pks)) { - $objs = array(); - } else { - $criteria = new Criteria(); - $criteria->add(LicenseManagerPeer::LICENSE_UID, $pks, Criteria::IN); - $objs = LicenseManagerPeer::doSelect($criteria, $con); - } - return $objs; - } -} - - -// static code to register the map builder for this Peer with the main Propel class -if (Propel::isInit()) { - // the MapBuilder classes register themselves with Propel during initialization - // so we need to load them here. - try { - BaseLicenseManagerPeer::getMapBuilder(); - } catch (Exception $e) { - Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR); - } -} else { - // even if Propel is not yet initialized, the map builder class can be registered - // now and then it will be loaded when Propel initializes. - require_once 'classes/model/map/LicenseManagerMapBuilder.php'; - Propel::registerMapBuilder('classes.model.map.LicenseManagerMapBuilder'); -} - diff --git a/workflow/engine/config/schema.xml b/workflow/engine/config/schema.xml index 7e0e6b460..a2bc510bf 100755 --- a/workflow/engine/config/schema.xml +++ b/workflow/engine/config/schema.xml @@ -4379,51 +4379,6 @@ - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - -
- diff --git a/workflow/engine/content/translations/english/processmaker.en.po b/workflow/engine/content/translations/english/processmaker.en.po index 59bac95a4..976f11b28 100755 --- a/workflow/engine/content/translations/english/processmaker.en.po +++ b/workflow/engine/content/translations/english/processmaker.en.po @@ -2035,12 +2035,6 @@ msgstr "Add Filter" msgid "Add horizontal line" msgstr "Add horizontal line" -# TRANSLATION -# LABEL/ID_ADD_LICENSE -#: LABEL/ID_ADD_LICENSE -msgid "Please add a new license" -msgstr "Please add a new license" - # TRANSLATION # LABEL/ID_ADD_MESSAGE #: LABEL/ID_ADD_MESSAGE @@ -5471,12 +5465,6 @@ msgstr "The current activity has cases and cannot be changed" msgid "Your browser is not supported. See the list of supported browsers. List of supported browsers is a link to the wiki page: http://wiki.processmaker.com/3.0/Supported_Browsers" msgstr "Your browser is not supported. See the list of supported browsers. List of supported browsers is a link to the wiki page: http://wiki.processmaker.com/3.0/Supported_Browsers" -# TRANSLATION -# LABEL/ID_CURRENT_LICENSE -#: LABEL/ID_CURRENT_LICENSE -msgid "Current license" -msgstr "Current license" - # TRANSLATION # LABEL/ID_CURRENT_TASKS #: LABEL/ID_CURRENT_TASKS @@ -7517,12 +7505,6 @@ msgstr "View user groups" msgid "Edit Web Entry" msgstr "Edit Web Entry" -# TRANSLATION -# LABEL/ID_EEPLUGIN_IMPORT_PLUGIN_NOT_IS_ENTERPRISE -#: LABEL/ID_EEPLUGIN_IMPORT_PLUGIN_NOT_IS_ENTERPRISE -msgid "The plugin \"{0}\" not is a Enterprise Edition Plugin" -msgstr "The plugin \"{0}\" not is a Enterprise Edition Plugin" - # TRANSLATION # LABEL/ID_EFFICIENCY_COST #: LABEL/ID_EFFICIENCY_COST @@ -8009,30 +7991,6 @@ msgstr "End of process" msgid "Engine" msgstr "Engine" -# TRANSLATION -# LABEL/ID_ENTERPRISE_FEATURES -#: LABEL/ID_ENTERPRISE_FEATURES -msgid "Enterprise Features" -msgstr "Enterprise Features" - -# TRANSLATION -# LABEL/ID_ENTERPRISE_INSTALLED -#: LABEL/ID_ENTERPRISE_INSTALLED -msgid "Enterprise Plugin has been correctly installed." -msgstr "Enterprise Plugin has been correctly installed." - -# TRANSLATION -# LABEL/ID_ENTERPRISE_PACK_CANT_UPLOAD -#: LABEL/ID_ENTERPRISE_PACK_CANT_UPLOAD -msgid "The Enterprise plugin pack can't be uploaded from this administrator, upload it from: ADMIN -> Plugins -> Plugins Manager" -msgstr "The Enterprise plugin pack can't be uploaded from this administrator, upload it from: ADMIN -> Plugins -> Plugins Manager" - -# TRANSLATION -# LABEL/ID_ENTERPRISE_PLUGINS -#: LABEL/ID_ENTERPRISE_PLUGINS -msgid "Enterprise Plugins" -msgstr "Enterprise Plugins" - # TRANSLATION # LABEL/ID_ENTER_SEARCH_CRITERIA #: LABEL/ID_ENTER_SEARCH_CRITERIA @@ -10271,12 +10229,6 @@ msgstr "Import Custom Case List" msgid "Import Data from CSV file" msgstr "Import Data from CSV file" -# TRANSLATION -# LABEL/ID_IMPORT_LICENSE -#: LABEL/ID_IMPORT_LICENSE -msgid "Import license" -msgstr "Import license" - # TRANSLATION # LABEL/ID_IMPORT_PMT #: LABEL/ID_IMPORT_PMT @@ -11081,12 +11033,6 @@ msgstr "In Progress" msgid "IP Client" msgstr "IP Client" -# TRANSLATION -# LABEL/ID_ISNT_LICENSE -#: LABEL/ID_ISNT_LICENSE -msgid "This isn't the correct license." -msgstr "This isn't the correct license." - # TRANSLATION # LABEL/ID_ISO8601_INVALID_FORMAT #: LABEL/ID_ISO8601_INVALID_FORMAT @@ -11405,12 +11351,6 @@ msgstr "The user's password must be changed before logging on the first time." msgid "The username is invalid." msgstr "The username is invalid." -# TRANSLATION -# LABEL/ID_LECA -#: LABEL/ID_LECA -msgid "Your license has expired. Please contact your administrator." -msgstr "Your license has expired. Please contact your administrator." - # TRANSLATION # LABEL/ID_LEFT #: LABEL/ID_LEFT @@ -11441,30 +11381,6 @@ msgstr "The library with {0}: \"{1}\" does not exist." msgid "The function with {0}: \"{1}\" does not exist in the library." msgstr "The function with {0}: \"{1}\" does not exist in the library." -# TRANSLATION -# LABEL/ID_LICENCE_LOGIN_TITLE -#: LABEL/ID_LICENCE_LOGIN_TITLE -msgid "License" -msgstr "License" - -# TRANSLATION -# LABEL/ID_LICENSE_EMPTY -#: LABEL/ID_LICENSE_EMPTY -msgid "Can not find any license" -msgstr "Can not find any license" - -# TRANSLATION -# LABEL/ID_LICENSE_FILE -#: LABEL/ID_LICENSE_FILE -msgid "License file" -msgstr "License file" - -# TRANSLATION -# LABEL/ID_LICENSE_SERVER -#: LABEL/ID_LICENSE_SERVER -msgid "License server" -msgstr "License server" - # TRANSLATION # LABEL/ID_LIFETIME_VALIDATE #: LABEL/ID_LIFETIME_VALIDATE @@ -19337,12 +19253,6 @@ msgstr "Menu" msgid "Menu Color" msgstr "Menu Color" -# TRANSLATION -# LABEL/ID_MENU_NAME -#: LABEL/ID_MENU_NAME -msgid "Enterprise Manager" -msgstr "Enterprise Manager" - # TRANSLATION # LABEL/ID_MESSAGE #: LABEL/ID_MESSAGE @@ -20513,12 +20423,6 @@ msgstr "Next Step" msgid "Next Task/Event" msgstr "Next Task/Event" -# TRANSLATION -# LABEL/ID_NLIC -#: LABEL/ID_NLIC -msgid "License installed successfully" -msgstr "License installed successfully" - # TRANSLATION # LABEL/ID_NO #: LABEL/ID_NO @@ -20819,24 +20723,12 @@ msgstr "No Inefficient User Groups" msgid "A problem occurred during the installation of the system. Please, uninstall the partial installation and try again." msgstr "A problem occurred during the installation of the system. Please, uninstall the partial installation and try again." -# TRANSLATION -# LABEL/ID_NO_INTERNET_CONECTION -#: LABEL/ID_NO_INTERNET_CONECTION -msgid "Enterprise Plugins Manager no connected to internet." -msgstr "Enterprise Plugins Manager no connected to internet." - # TRANSLATION # LABEL/ID_NO_ITEMS_SELECTED #: LABEL/ID_NO_ITEMS_SELECTED msgid "No item selected." msgstr "No item selected." -# TRANSLATION -# LABEL/ID_NO_LICENSE_FEATURE_ENABLED -#: LABEL/ID_NO_LICENSE_FEATURE_ENABLED -msgid "Your license does not have the Gmail integration. Please contact your administrator." -msgstr "Your license does not have the Gmail integration. Please contact your administrator." - # TRANSLATION # LABEL/ID_NO_MANAGER_SELECTED #: LABEL/ID_NO_MANAGER_SELECTED @@ -22013,12 +21905,6 @@ msgstr "Please select a json file to upload" msgid "Only accepts files in JSON format" msgstr "Only accepts files in JSON format" -# TRANSLATION -# LABEL/ID_PMPLUGIN_IMPORT_PLUGIN_IS_ENTERPRISE -#: LABEL/ID_PMPLUGIN_IMPORT_PLUGIN_IS_ENTERPRISE -msgid "The plugin \"{0}\" is a Enterprise Edition Plugin, please install the Enterprise Plugins Manager to use this plugin" -msgstr "The plugin \"{0}\" is a Enterprise Edition Plugin, please install the Enterprise Plugins Manager to use this plugin" - # TRANSLATION # LABEL/ID_PMTABLE #: LABEL/ID_PMTABLE @@ -24869,12 +24755,6 @@ msgstr "First select a language from the list please." msgid "Select at least one field (You can select a maximum of 80 fields)" msgstr "Select at least one field (You can select a maximum of 80 fields)" -# TRANSLATION -# LABEL/ID_SELECT_LICENSE_FILE -#: LABEL/ID_SELECT_LICENSE_FILE -msgid "Select a license file" -msgstr "Select a license file" - # TRANSLATION # LABEL/ID_SELECT_ONE_AT_LEAST #: LABEL/ID_SELECT_ONE_AT_LEAST @@ -27629,12 +27509,6 @@ msgstr "Update Group" msgid "Update Input Document" msgstr "Update Input Document" -# TRANSLATION -# LABEL/ID_UPDATE_LICENSE -#: LABEL/ID_UPDATE_LICENSE -msgid "Upload License" -msgstr "Upload License" - # TRANSLATION # LABEL/ID_UPDATE_LOGIN_SETTINGS #: LABEL/ID_UPDATE_LOGIN_SETTINGS @@ -27689,12 +27563,6 @@ msgstr "Update trigger" msgid "Update User" msgstr "Update User" -# TRANSLATION -# LABEL/ID_UPDATING_LICENSE_MSG -#: LABEL/ID_UPDATING_LICENSE_MSG -msgid "Uploading the license file..." -msgstr "Uploading the license file..." - # TRANSLATION # LABEL/ID_UPDATING_TABLE #: LABEL/ID_UPDATING_TABLE @@ -27713,12 +27581,6 @@ msgstr "Upgrade System" msgid "Upgrades/Patches" msgstr "Upgrades/Patches" -# TRANSLATION -# LABEL/ID_UPGRADE_ENTERPRISE -#: LABEL/ID_UPGRADE_ENTERPRISE -msgid "This feature is not available in ProcessMaker Community Edition. Please upgrade to ProcessMaker Enterprise Edition." -msgstr "This feature is not available in ProcessMaker Community Edition. Please upgrade to ProcessMaker Enterprise Edition." - # TRANSLATION # LABEL/ID_UPGRADE_FINISHED #: LABEL/ID_UPGRADE_FINISHED @@ -28757,24 +28619,6 @@ msgstr "Please wait while upgrading ProcessMaker..." msgid "WARNING" msgstr "WARNING" -# TRANSLATION -# LABEL/ID_WARNING_ENTERPRISE_LICENSE_MSG -#: LABEL/ID_WARNING_ENTERPRISE_LICENSE_MSG -msgid "Please select a valid license file." -msgstr "Please select a valid license file." - -# TRANSLATION -# LABEL/ID_WARNING_ENTERPRISE_LICENSE_MSG_DAT -#: LABEL/ID_WARNING_ENTERPRISE_LICENSE_MSG_DAT -msgid "The file doesn't have a .dat extension, please select another file." -msgstr "The file doesn't have a .dat extension, please select another file." - -# TRANSLATION -# LABEL/ID_WARNING_ERROR_UPDATING -#: LABEL/ID_WARNING_ERROR_UPDATING -msgid "Error uploading the license file." -msgstr "Error uploading the license file." - # TRANSLATION # LABEL/ID_WARNING_GATEWAY_CONVERGENT_WITH_CONDITION #: LABEL/ID_WARNING_GATEWAY_CONVERGENT_WITH_CONDITION @@ -29201,12 +29045,6 @@ msgstr "Your file has exceeded the file maximum size that is {0}." msgid "Your image has been successfully uploaded" msgstr "Your image has been successfully uploaded" -# TRANSLATION -# LABEL/ID_YOUR_LICENSE -#: LABEL/ID_YOUR_LICENSE -msgid "Your license" -msgstr "Your license" - # TRANSLATION # LABEL/ID_YOUR_PASSWORD_IS #: LABEL/ID_YOUR_PASSWORD_IS @@ -39525,42 +39363,6 @@ msgstr "Send Request" msgid "[login/forgotPasswordpm3.xml?BCANCEL] Cancel" msgstr "Cancel" -# login/licenseExpired.xml?thetitle -# login/licenseExpired.xml -#: title - thetitle -msgid "Your license has expired or the system does not have a license. To use the ProcessMaker Enterprise Edition upload a valid license" -msgstr "Your license has expired or the system does not have a license. To use the ProcessMaker Enterprise Edition upload a valid license" - -# login/licenseExpired.xml?licenseFile -# login/licenseExpired.xml -#: file - licenseFile -msgid "License File" -msgstr "License File" - -# login/licenseExpired.xml?updateButton -# login/licenseExpired.xml -#: submit - updateButton -msgid "Update License" -msgstr "Update License" - -# login/licenseExpiredpm3.xml?thetitle -# login/licenseExpiredpm3.xml -#: title - thetitle -msgid "[login/licenseExpiredpm3.xml?thetitle] Your license has expired or the system does not have a license. To use the ProcessMaker Enterprise Edition upload a valid license" -msgstr "Your license has expired or the system does not have a license. To use the ProcessMaker Enterprise Edition upload a valid license" - -# login/licenseExpiredpm3.xml?licenseFile -# login/licenseExpiredpm3.xml -#: file - licenseFile -msgid "[login/licenseExpiredpm3.xml?licenseFile] License File" -msgstr "License File" - -# login/licenseExpiredpm3.xml?updateButton -# login/licenseExpiredpm3.xml -#: submit - updateButton -msgid "[login/licenseExpiredpm3.xml?updateButton] Update License" -msgstr "Update License" - # login/login.xml?TITLE # login/login.xml #: title - TITLE diff --git a/workflow/engine/controllers/InstallerModule.php b/workflow/engine/controllers/InstallerModule.php index c6df71a34..53a141405 100644 --- a/workflow/engine/controllers/InstallerModule.php +++ b/workflow/engine/controllers/InstallerModule.php @@ -1171,7 +1171,6 @@ class InstallerModule extends Controller * Upload translation .po file * Upload skin file * Upload plugin file - * Active plugins to enterprise * * @param string $username * @param string $password @@ -1308,64 +1307,6 @@ class InstallerModule extends Controller $output = curl_exec($ch); curl_close($ch); } - - /** - * Active plugins to enterprise - */ - - if (!defined("PATH_PM_ENTERPRISE")) { - define("PATH_PM_ENTERPRISE", PATH_CORE . "/plugins/enterprise/"); - } - set_include_path(PATH_PM_ENTERPRISE . PATH_SEPARATOR . get_include_path()); - require_once('classes/model/AddonsManager.php'); - - $plugins = glob(PATH_CORE . "plugins/*.php"); - foreach ($plugins as $value) { - $dataPlugin = pathinfo($value); - $namePlugin = $dataPlugin['filename']; - if ($value !== 'enterprise') { - $db_hostname = trim($_REQUEST['db_hostname']); - $db_hostname = $filter->validateInput($db_hostname); - $db_port = trim($_REQUEST['db_port']); - $db_port = $filter->validateInput($db_port); - $db_username = trim($_REQUEST['db_username']); - $db_username = $filter->validateInput($db_username); - $db_password = urlencode(trim($_REQUEST['db_password'])); - $db_password = urldecode($filter->validateInput($db_password)); - $wf = trim($_REQUEST['wfDatabase']); - $wf = $filter->validateInput($wf); - - $db_host = ($db_port != '' && $db_port != 3306) ? $db_hostname . ':' . $db_port : $db_hostname; - - $row = DB::connection(self::CONNECTION_INSTALL) - ->table('ADDONS_MANAGER') - ->select('STORE_ID') - ->where('ADDON_NAME', $namePlugin) - ->toArray(); - - if ($row) { - $ch = curl_init(); - $postData = []; - $postData['action'] = "enable"; - $postData['addon'] = $namePlugin; - $postData['store'] = $row['STORE_ID']; - - curl_setopt($ch, CURLOPT_URL, "$serv/sys{$workspace}/{$lang}/{$skinName}/enterprise/addonsStoreAction"); - curl_setopt($ch, CURLOPT_HEADER, 0); - curl_setopt($ch, CURLOPT_VERBOSE, 0); - curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile); - curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefile); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); - curl_setopt($ch, CURLOPT_TIMEOUT, 90); - - $output = curl_exec($ch); - curl_close($ch); - } - } - } } /** diff --git a/workflow/engine/controllers/adminProxy.php b/workflow/engine/controllers/adminProxy.php index 01a8aadb4..0995993dd 100644 --- a/workflow/engine/controllers/adminProxy.php +++ b/workflow/engine/controllers/adminProxy.php @@ -1430,18 +1430,6 @@ class adminProxy extends HttpProxyController $oServerConf = ServerConf::getSingleton(); $pluginRegistry = PluginRegistry::loadSingleton(); - $licenseManager = PmLicenseManager::getSingleton(); - - //License Information: - $activeLicense = $licenseManager->getActiveLicense(); - $licenseInfo = array(); - $noInclude = array('licensedfeaturesList', 'result', 'serial'); - foreach ($licenseManager as $index => $value) { - if (!in_array($index, $noInclude)) { - $licenseInfo[$index] = G::sanitizeInput($value); - } - } - $params['l'] = $licenseInfo; //Operative System version (Linux, Windows) try { @@ -1457,10 +1445,6 @@ class adminProxy extends HttpProxyController } $params['s'] = $os; - //On premise or cloud - $licInfo = $oServerConf->getProperty( 'LICENSE_INFO' ); - $params['lt'] = isset($licInfo[config("system.workspace")]) ? isset($licInfo[config("system.workspace")]['TYPE'])? $licInfo[config("system.workspace")]['TYPE'] : '' : ''; - //ProcessMaker Version $params['v'] = System::getVersion(); if (file_exists(PATH_DATA. 'log/upgrades.log')) { @@ -1487,38 +1471,8 @@ class adminProxy extends HttpProxyController $params['php'] = $systemInfo->php->version; //Apache - nginx - IIS Version - $params['serverSoftwareVersion'] = System::getServerVersion(); - //Installed Plugins (license info?) - $arrayAddon = array(); - - $eeData = Cache::get(config('system.workspace') . 'enterprise.ee', function () { - if (file_exists(PATH_DATA_SITE . 'ee')) { - return trim(file_get_contents(PATH_DATA_SITE . 'ee')); - } - return null; - }); - if ($eeData) { - $arrayAddon = unserialize($eeData); - } - - $plugins = array(); - foreach ($arrayAddon as $addon) { - $sFileName = substr($addon["sFilename"], 0, strpos($addon["sFilename"], "-")); - - if (file_exists(PATH_PLUGINS . $sFileName . ".php")) { - $plugin = array(); - $addonDetails = $pluginRegistry->getPluginDetails($sFileName . ".php"); - $plugin['name'] = $addonDetails->getNamespace(); - $plugin['description'] = $addonDetails->getDescription(); - $plugin['version'] = $addonDetails->getVersion(); - $plugin['enable'] = $addonDetails->isEnabled(); - $plugins[] = $plugin; - } - } - $params['pl'] = $plugins; - //Number of Users registered in PM. Including LDAP users and PM users. require_once("classes/model/RbacUsers.php"); $criteria = new Criteria("rbac"); @@ -1562,7 +1516,7 @@ class adminProxy extends HttpProxyController $params['t'] = (defined('TIME_ZONE') && TIME_ZONE != "Unknown") ? TIME_ZONE : date_default_timezone_get(); $params['w'] = count(System::listWorkspaces()); - $support = PATH_DATA_SITE . G::sanitizeString($licenseManager->info['FIRST_NAME'] . '-' . $licenseManager->info['LAST_NAME'] . '-' . config("system.workspace") . '-' . date('YmdHis'), false, false) . '.spm'; + $support = PATH_DATA_SITE . G::sanitizeString(config("system.workspace") . '-' . date('YmdHis'), false, false) . '.spm'; file_put_contents($support, serialize($params)); G::streamFile($support, true); G::rm_dir($support); diff --git a/workflow/engine/controllers/home.php b/workflow/engine/controllers/home.php index 50dc3ff87..5996674c0 100644 --- a/workflow/engine/controllers/home.php +++ b/workflow/engine/controllers/home.php @@ -483,7 +483,6 @@ class Home extends Controller $dataList['action'] = $type; $dataList['dir'] = 'DESC'; - //In enterprise version this block of code should always be executed //In community version this block of code is deleted and is executed the other $listType = ''; if (!empty($type)) { diff --git a/workflow/engine/controllers/main.php b/workflow/engine/controllers/main.php index cedd43681..cd60d1f9f 100644 --- a/workflow/engine/controllers/main.php +++ b/workflow/engine/controllers/main.php @@ -36,16 +36,6 @@ class Main extends Controller $this->setVar( 'workspace', !empty(config("system.workspace")) ? ucfirst( config("system.workspace") ) : '' ); $this->setVar( 'user_avatar', 'users/users_ViewPhotoGrid?pUID=' . $_SESSION['USER_LOGGED'] . '&h=' . rand() ); - // license notification - $expireInLabel = ''; - - require_once("classes" . PATH_SEP . "class.pmLicenseManager.php"); - $pmLicenseManager = PmLicenseManager::getSingleton(); - $expireIn = $pmLicenseManager->getExpireIn(); - $expireInLabel = $pmLicenseManager->getExpireInLabel(); - - $this->setVar('licenseNotification', $expireInLabel); - // setting variables on javascript env. $this->setJSVar('meta', array('menu' => $this->getMenu() )); diff --git a/workflow/engine/controllers/pmGmail.php b/workflow/engine/controllers/pmGmail.php index b038e07e5..3de9bd629 100644 --- a/workflow/engine/controllers/pmGmail.php +++ b/workflow/engine/controllers/pmGmail.php @@ -65,16 +65,8 @@ class pmGmail extends Controller $googleCertificate = $pmGoogle->getServiceAccountCertificate(); $statusGmail = $pmGoogle->getServiceGmailStatus(); $statusDrive = $pmGoogle->getServiceDriveStatus(); - $disableGmail = true; - $disableDrive = true; - - $licensedFeatures = PMLicensedFeatures::getSingleton(); - if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) { - $disableGmail = false; - } - if ($licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) { - $disableDrive = false; - } + $disableGmail = false; + $disableDrive = false; $this->setJSVar('accountEmail', $accountEmail); $this->setJSVar('googleCertificate', $googleCertificate); diff --git a/workflow/engine/controllers/strategicDashboard.php b/workflow/engine/controllers/strategicDashboard.php index 1a4552ce2..6b1e189a8 100644 --- a/workflow/engine/controllers/strategicDashboard.php +++ b/workflow/engine/controllers/strategicDashboard.php @@ -24,12 +24,6 @@ class StrategicDashboard extends Controller { global $RBAC; - $licensedFeatures = PMLicensedFeatures::getSingleton(); - if (!$licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) { - G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels'); - G::header('location: ../login/login'); - die; - } $this->usrId = $RBAC->aUserInfo['USER_INFO']['USR_UID']; $user = new Users(); $user = $user->load($RBAC->aUserInfo['USER_INFO']['USR_UID']); diff --git a/workflow/engine/data/mysql/insert.sql b/workflow/engine/data/mysql/insert.sql index e86b5c6d8..c15a536a2 100755 --- a/workflow/engine/data/mysql/insert.sql +++ b/workflow/engine/data/mysql/insert.sql @@ -57141,7 +57141,6 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_ADD_FILE','en','Add file','2020-06-11') , ( 'LABEL','ID_ADD_FILTER','en','Add Filter','2020-12-16') , ( 'LABEL','ID_ADD_HORIZONTAL_LINE','en','Add horizontal line','2015-02-20') , -( 'LABEL','ID_ADD_LICENSE','en','Please add a new license','2014-01-15') , ( 'LABEL','ID_ADD_MESSAGE','en','Add message','2014-01-15') , ( 'LABEL','ID_ADD_NOTE','en','Add Note','2014-01-15') , ( 'LABEL','ID_ADD_PERMISSION_TO_ROLE','en','Add Permission To Role','2014-10-10') , @@ -57734,7 +57733,6 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_CURLFUN_ISUNDEFINED','en','The process was not downloaded, because the curl extension for php is not installed','2014-01-15') , ( 'LABEL','ID_CURRENT_ASSING_TYPE_WITH_CASES','en','The current activity has cases and cannot be changed','2022-02-11') , ( 'LABEL','ID_CURRENT_BROWSER_NOT_SUPPORTED','en','Your browser is not supported. See the list of supported browsers. List of supported browsers is a link to the wiki page: http://wiki.processmaker.com/3.0/Supported_Browsers','2014-10-22') , -( 'LABEL','ID_CURRENT_LICENSE','en','Current license','2014-09-18') , ( 'LABEL','ID_CURRENT_TASKS','en','Current Task(s) Properties','2021-03-20') , ( 'LABEL','ID_CURRENT_USER','en','Current User','2014-01-15') , ( 'LABEL','ID_CURRENT_USERS','en','Current Users','2014-01-15') , @@ -58091,7 +58089,6 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_EDIT_USERS','en','Edit Users','2014-01-15') , ( 'LABEL','ID_EDIT_VIEW_USER_GROUP','en','View user groups','2014-01-15') , ( 'LABEL','ID_EDIT_WEB_ENTRY','en','Edit Web Entry','2014-01-15') , -( 'LABEL','ID_EEPLUGIN_IMPORT_PLUGIN_NOT_IS_ENTERPRISE','en','The plugin "{0}" not is a Enterprise Edition Plugin','2016-07-14') , ( 'LABEL','ID_EFFICIENCY_COST','en','Efficiency cost','2015-03-30') , ( 'LABEL','ID_EFFICIENCY_INDEX','en','Efficiency Index','2015-03-30') , ( 'LABEL','ID_EFFICIENCY_USER','en','User Efficiency','2015-03-30') , @@ -58176,10 +58173,6 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_END_MESSAGE_EVENT','en','End Message Event (Message Event)','2014-01-15') , ( 'LABEL','ID_END_OF_PROCESS','en','End of process','2014-01-15') , ( 'LABEL','ID_ENGINE','en','Engine','2014-01-15') , -( 'LABEL','ID_ENTERPRISE_FEATURES','en','Enterprise Features','2015-04-27') , -( 'LABEL','ID_ENTERPRISE_INSTALLED','en','Enterprise Plugin has been correctly installed.','2014-01-15') , -( 'LABEL','ID_ENTERPRISE_PACK_CANT_UPLOAD','en','The Enterprise plugin pack can''t be uploaded from this administrator, upload it from: ADMIN -> Plugins -> Plugins Manager','2014-12-03') , -( 'LABEL','ID_ENTERPRISE_PLUGINS','en','Enterprise Plugins','2014-09-18') , ( 'LABEL','ID_ENTER_SEARCH_CRITERIA','en','Enter a search criteria and press search','2014-01-15') , ( 'LABEL','ID_ENTER_SEARCH_TERM','en','Search...','2015-05-08') , ( 'LABEL','ID_ENTER_VALID_URL','en','Enter a valid URL to redirect the browser after the web entry is completed','2017-07-04') , @@ -58570,7 +58563,6 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_IMPORT_CSV','en','CSV Import','2014-01-15') , ( 'LABEL','ID_IMPORT_CUSTOM_CASE_LIST','en','Import Custom Case List','2021-09-09') , ( 'LABEL','ID_IMPORT_DATA_CSV','en','Import Data from CSV file','2014-01-15') , -( 'LABEL','ID_IMPORT_LICENSE','en','Import license','2014-09-18') , ( 'LABEL','ID_IMPORT_PMT','en','Import PM Table','2014-01-15') , ( 'LABEL','ID_IMPORT_PROCESS','en','Import Process','2014-01-15') , ( 'LABEL','ID_IMPORT_PROCESS_OBJECTS','en','Import Process Objects','2016-03-30') , @@ -58710,7 +58702,6 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_IN_DRAFT','en','In Draft','2021-01-20') , ( 'LABEL','ID_IN_PROGRESS','en','In Progress','2014-01-15') , ( 'LABEL','ID_IP','en','IP Client','2014-10-08') , -( 'LABEL','ID_ISNT_LICENSE','en','This isn''t the correct license.','2014-01-15') , ( 'LABEL','ID_ISO8601_INVALID_FORMAT','en','Invalid value for "{0}", this has not the format ISO 8601.','2015-11-04') , ( 'LABEL','ID_ISSUED_TO','en','Issued to','2014-09-18') , ( 'LABEL','ID_IS_NOT_REGISTERED','en','is not registered!','2014-01-15') , @@ -58766,17 +58757,12 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_LDAP_USERS','en','LDAP Users','2015-09-15') , ( 'LABEL','ID_LDAP_USER_MUST_RESET_PASSWORD','en','The user''s password must be changed before logging on the first time.','2020-10-02') , ( 'LABEL','ID_LDAP_USER_NOT_FOUND_INVALID','en','The username is invalid.','2020-10-02') , -( 'LABEL','ID_LECA','en','Your license has expired. Please contact your administrator.','2016-07-28') , ( 'LABEL','ID_LEFT','en','left','2014-09-18') , ( 'LABEL','ID_LEFT_MARGIN','en','Left Margin','2014-01-15') , ( 'LABEL','ID_LESS_THAN','en','less than','2015-03-23') , ( 'LABEL','ID_LEVEL','en','Level','2021-08-26') , ( 'LABEL','ID_LIBRARY_DOES_NOT_EXIST','en','The library with {0}: "{1}" does not exist.','2014-05-20') , ( 'LABEL','ID_LIBRARY_FUNCTION_DOES_NOT_EXIST','en','The function with {0}: "{1}" does not exist in the library.','2014-05-20') , -( 'LABEL','ID_LICENCE_LOGIN_TITLE','en','License','2015-12-07') , -( 'LABEL','ID_LICENSE_EMPTY','en','Can not find any license','2014-01-15') , -( 'LABEL','ID_LICENSE_FILE','en','License file','2014-09-18') , -( 'LABEL','ID_LICENSE_SERVER','en','License server','2014-09-18') , ( 'LABEL','ID_LIFETIME_VALIDATE','en','Max Lifetime value has to be a positive integer','2017-04-05') , ( 'LABEL','ID_LINE','en','Line','2014-01-15') , ( 'LABEL','ID_LINES','en','Lines','2015-03-09') , @@ -60117,7 +60103,6 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_MEMORY_LIMIT_VALIDATE','en','Memory Limit value has to be either a positive integer or -1','2017-04-05') , ( 'LABEL','ID_MENU','en','Menu','2022-01-07') , ( 'LABEL','ID_MENU_COLOR','en','Menu Color','2021-08-10') , -( 'LABEL','ID_MENU_NAME','en','Enterprise Manager','2014-10-17') , ( 'LABEL','ID_MESSAGE','en','Message','2014-01-15') , ( 'LABEL','ID_MESSAGES','en','Messages','2014-01-15') , ( 'LABEL','ID_MESSAGES_HISTORY','en','Messages History','2014-01-15') , @@ -60319,7 +60304,6 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_NEXT','en','Next','2014-01-15') , ( 'LABEL','ID_NEXT_STEP','en','Next Step','2014-01-15') , ( 'LABEL','ID_NEXT_TASK','en','Next Task/Event','2016-07-29') , -( 'LABEL','ID_NLIC','en','License installed successfully','2014-12-02') , ( 'LABEL','ID_NO','en','No','2014-01-15') , ( 'LABEL','ID_NO_SEARCHING_METHOD','en','No searching method','2021-08-16') , ( 'LABEL','ID_NODELETEOPTIONALL','en','You must add all the days that you have selected in work days, otherwise you should leave at least an "-- ALL --" option.','2014-01-15') , @@ -60372,9 +60356,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_NO_INEFFICIENT_USERS','en','No Inefficient Users','2015-04-29') , ( 'LABEL','ID_NO_INEFFICIENT_USER_GROUPS','en','No Inefficient User Groups','2015-04-29') , ( 'LABEL','ID_NO_INSTALL','en','A problem occurred during the installation of the system. Please, uninstall the partial installation and try again.','2014-01-15') , -( 'LABEL','ID_NO_INTERNET_CONECTION','en','Enterprise Plugins Manager no connected to internet.','2014-09-18') , ( 'LABEL','ID_NO_ITEMS_SELECTED','en','No item selected.','2015-01-16') , -( 'LABEL','ID_NO_LICENSE_FEATURE_ENABLED','en','Your license does not have the Gmail integration. Please contact your administrator.','2015-09-17') , ( 'LABEL','ID_NO_MANAGER_SELECTED','en','No Manager Selected','2014-01-15') , ( 'LABEL','ID_NO_MATCHING_RECORDS','en','No matching records','2020-12-10') , ( 'LABEL','ID_NO_MORE_APPLICATIONS','en','No more applications to show.','2014-01-15') , @@ -60578,7 +60560,6 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_PMG_FILE','en','Service Account Certificate','2015-12-09') , ( 'LABEL','ID_PMG_SELECT_FILE','en','Please select a json file to upload','2016-01-05') , ( 'LABEL','ID_PMG_TYPE_ACCEPT','en','Only accepts files in JSON format','2016-01-04') , -( 'LABEL','ID_PMPLUGIN_IMPORT_PLUGIN_IS_ENTERPRISE','en','The plugin "{0}" is a Enterprise Edition Plugin, please install the Enterprise Plugins Manager to use this plugin','2016-07-14') , ( 'LABEL','ID_PMTABLE','en','PM Table','2014-01-15') , ( 'LABEL','ID_PMTABLES','en','PM Tables','2014-01-15') , ( 'LABEL','ID_PMTABLES_ALERT1','en','You can''t repeat a column name, please rename:','2014-01-15') , @@ -61071,7 +61052,6 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_SELECT_GRID','en','Select a grid','2014-01-15') , ( 'LABEL','ID_SELECT_LANGUAGE_FROM_LIST','en','First select a language from the list please.','2014-01-15') , ( 'LABEL','ID_SELECT_LEAST_FIELD','en','Select at least one field (You can select a maximum of 80 fields)','2014-10-27') , -( 'LABEL','ID_SELECT_LICENSE_FILE','en','Select a license file','2014-09-18') , ( 'LABEL','ID_SELECT_ONE_AT_LEAST','en','Select at least one item from the list','2014-01-15') , ( 'LABEL','ID_SELECT_ONE_ITEM_FROM_LIST','en','Select just one item from the list to be edited','2015-01-16') , ( 'LABEL','ID_SELECT_ONE_OPTION','en','select one option','2014-01-15') , @@ -61586,7 +61566,6 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_UPDATE_FAILED','en','Updated Failed','2014-01-15') , ( 'LABEL','ID_UPDATE_GROUP','en','Update Group','2014-10-10') , ( 'LABEL','ID_UPDATE_INPUT_DOCUMENT','en','Update Input Document','2015-02-20') , -( 'LABEL','ID_UPDATE_LICENSE','en','Upload License','2014-09-18') , ( 'LABEL','ID_UPDATE_LOGIN_SETTINGS','en','Update Login Settings','2014-10-10') , ( 'LABEL','ID_UPDATE_OUTPUT_DOCUMENT','en','Update Output Document','2015-02-20') , ( 'LABEL','ID_UPDATE_PMTABLE','en','Update PM Table','2014-10-10') , @@ -61596,11 +61575,9 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_UPDATE_TEXT','en','Edit Text','2015-02-20') , ( 'LABEL','ID_UPDATE_TRIGGER','en','Update trigger','2015-02-20') , ( 'LABEL','ID_UPDATE_USER','en','Update User','2014-10-10') , -( 'LABEL','ID_UPDATING_LICENSE_MSG','en','Uploading the license file...','2014-09-18') , ( 'LABEL','ID_UPDATING_TABLE','en','Updating table, please wait...','2014-01-15') , ( 'LABEL','ID_UPGRADE','en','Upgrade System','2014-01-15') , ( 'LABEL','ID_UPGRADES_PATCHES','en','Upgrades/Patches','2014-01-15') , -( 'LABEL','ID_UPGRADE_ENTERPRISE','en','This feature is not available in ProcessMaker Community Edition. Please upgrade to ProcessMaker Enterprise Edition.','2015-09-11') , ( 'LABEL','ID_UPGRADE_FINISHED','en','Upgrade finished.','2014-09-18') , ( 'LABEL','ID_UPGRADE_LABEL','en','Upgrade','2014-09-18') , ( 'LABEL','ID_UPGRADE_NEVER_UPGRADE','en','Never upgraded','2014-01-15') , @@ -61779,9 +61756,6 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_WAIT_INSTALLING_PLUGIN','en','Please wait while the plugin is being installed...','2014-10-21') , ( 'LABEL','ID_WAIT_WHILE_UPGRADING_PROCESSMAKER','en','Please wait while upgrading ProcessMaker...','2014-09-18') , ( 'LABEL','ID_WARNING','en','WARNING','2014-01-15') , -( 'LABEL','ID_WARNING_ENTERPRISE_LICENSE_MSG','en','Please select a valid license file.','2014-09-18') , -( 'LABEL','ID_WARNING_ENTERPRISE_LICENSE_MSG_DAT','en','The file doesn''t have a .dat extension, please select another file.','2014-09-18') , -( 'LABEL','ID_WARNING_ERROR_UPDATING','en','Error uploading the license file.','2014-09-18') , ( 'LABEL','ID_WARNING_GATEWAY_CONVERGENT_WITH_CONDITION','en','Your Gateway Convergent has a condition, save again your process.','2016-06-23') , ( 'LABEL','ID_WARNING_PMTABLES','en','Error uploading the PM Table(s)','2016-02-18') , ( 'LABEL','ID_WEBBOT','en','Webbots','2014-01-15') , @@ -61859,7 +61833,6 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_YES_VALUE','en','Yes','2014-01-15') , ( 'LABEL','ID_YOUR_FILE_HAS_EXCEEDED','en','Your file has exceeded the file maximum size that is 10MB.','2020-06-12') , ( 'LABEL','ID_YOUR_IMAGE_HAS_BEEN_SUCCESSFULLY','en','Your image has been successfully uploaded','2014-01-15') , -( 'LABEL','ID_YOUR_LICENSE','en','Your license','2014-09-18') , ( 'LABEL','ID_YOUR_PASSWORD_IS','en','Your password is','2014-01-15') , ( 'LABEL','ID_YOUR_USERMANE_IS','en','Your username is','2014-01-15') , ( 'LABEL','ID_YOU_ARE_FIRST_STEP','en','You are in the first step!','2014-01-15') , @@ -62004,7 +61977,6 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE INSERT INTO DASHLET (DAS_UID,DAS_CLASS,DAS_TITLE,DAS_DESCRIPTION,DAS_VERSION,DAS_CREATE_DATE,DAS_UPDATE_DATE,DAS_STATUS) VALUES ('00000000000000000000000000000001','DashletOpenVSCompleted','Open Cases VS Completed Cases','Open Cases VS Completed Cases','1.0','2011-10-28 00:00:00','2011-10-28 00:00:00','1'), ('00000000000000000000000000000002','DashletProcessMakerCommunity','ProcessMaker Community','ProcessMaker Community Links and Information','1.0','2011-12-01 00:00:00','2011-12-01 00:00:00','1'), -('00000000000000000000000000000003','DashletProcessMakerEnterprise','ProcessMaker Enterprise Plugins and Addons','The following list of Enterprise plug-ins includes features and functionality that extend and enhance ProcessMaker''s performance and functionality.','1.0','2011-12-05 00:00:00','2011-12-05 00:00:00','1'), ('00000000000000000000000000000004','DashletRssReader','Simple RSS reader','Simple RSS reader for ProcessMaker','1.0','2012-04-16 00:00:00','2012-04-16 00:00:00','1'); INSERT INTO DASHLET_INSTANCE (DAS_INS_UID,DAS_UID,DAS_INS_OWNER_TYPE,DAS_INS_OWNER_UID,DAS_INS_ADDITIONAL_PROPERTIES,DAS_INS_CREATE_DATE,DAS_INS_UPDATE_DATE,DAS_INS_STATUS) VALUES @@ -62033,25 +62005,6 @@ INSERT INTO CATALOG (CAT_UID,CAT_LABEL_ID,CAT_TYPE,CAT_FLAG,CAT_OBSERVATION,CAT_ ('300','ID_SEMESTER','PERIODICITY','','','2015-03-04 00:00:00','2015-03-04 00:00:00'), ('400','ID_YEAR','PERIODICITY','','','2015-03-04 00:00:00','2015-03-04 00:00:00'); -INSERT INTO ADDONS_MANAGER (ADDON_DESCRIPTION,ADDON_ID,ADDON_NAME,ADDON_NICK,ADDON_PUBLISHER,ADDON_RELEASE_TYPE,ADDON_STATUS,ADDON_STATE,STORE_ID,ADDON_TYPE,ADDON_DOWNLOAD_URL,ADDON_VERSION,ADDON_DOWNLOAD_PROGRESS) VALUES -('Actions By Email allows users to enter information and route cases via email.','actionsByEmail','actionsByEmail','actionsByEmail','Colosa','localRegistry','ready','','00000000000000000000000000010004','features','','','0'), -('Registers every administrator action in a log. Any change in the settings under the Admin menu is registered in the log.','auditLog','auditLog','auditLog','Colosa','localRegistry','ready','','00000000000000000000000000010001','features','','','0'), -('Enables the code scanner feature.','codeScanner','codeScanner','codeScanner','Colosa','localRegistry','ready','','00000000000000000000000000010007','features','','','0'), -('This plugin will synchronize ProcessMaker with an LDAP or Active Directory server for user authentication.','ldapAdvanced','ldapAdvanced','ldapAdvanced','Colosa','localRegistry','ready','','00000000000000000000000000010010','features','','','0'), -('Enables the mobile fields.','mobileFields','mobileFields','mobileFields','Colosa','localRegistry','ready','','00000000000000000000000000010008','features','','','0'), -('Enables the multiple email configuration feature.','multipleEmailServers','multipleEmailServers','multipleEmailServers','Colosa','localRegistry','ready','','00000000000000000000000000010009','features','','','0'), -('Batch Routing allows a user to route multiple cases at a time onto the next task in the process.','pmConsolidatedCL','pmConsolidatedCL','pmConsolidatedCL','Colosa','localRegistry','ready','','00000000000000000000000000010005','features','','','0'), -('Integration with Gmail','pmGmail','pmGmail','pmGmail','Colosa','localRegistry','ready','','00000000000000000000000000010012','features','','','0'), -('This Feature will allow to store all input, output and attached documents generated in your processes in Google Drive.','pmGoogleDrive','pmGoogleDrive','pmGoogleDrive','Colosa','localRegistry','ready','','00000000000000000000000000010015','features','','','0'), -('Enables the configuration of a second database connection in order to divide the database requests in read and write operations. This features is used with database clusters to improve the application performance.','secondDatabaseConnection','secondDatabaseConnection','secondDatabaseConnection','Colosa','localRegistry','ready','','00000000000000000000000000010000','features','','','0'), -('A more secure option to store user passwords in ProcessMaker. The modern algorithm SHA-2 is used to store the passwords.','secureUserPasswordHash','secureUserPasswordHash','secureUserPasswordHash','Colosa','localRegistry','ready','','00000000000000000000000000010002','features','','','0'), -('Promotion Manager','selectiveImportExport','selectiveImportExport','selectiveImportExport','Colosa','localRegistry','ready','','00000000000000000000000000010016','features','','','0'), -('This features allows ProcessMaker to send out notifications using different email accounts and email servers.','sendEmailFromDifferentEmailServers','sendEmailFromDifferentEmailServers','sendEmailFromDifferentEmailServers','Colosa','localRegistry','ready','','00000000000000000000000000010003','features','','','0'), -('Dashboard with improved charting graphics and optimized to show strategic information like Process Efficiency and User Efficiency indicators.','strategicDashboards','strategicDashboards','Strategic Dashboards','Colosa','localRegistry','ready','','00000000000000000000000000010006','features','','','0'), -('User-based Language Management.','userBasedLanguage','userBasedLanguage','userBasedLanguage','Colosa','localRegistry','ready','','00000000000000000000000000010013','features','','','0'), -('User-based Time Zone Management.','userBasedTimeZone','userBasedTimeZone','userBasedTimeZone','Colosa','localRegistry','ready','','00000000000000000000000000010014','features','','','0'), -('SSO with an LDAP provider.','windowsSSO','windowsSSO','windowsSSO','Colosa','localRegistry','ready','','00000000000000000000000000010011','features','','','0'); - INSERT INTO APP_SEQUENCE (ID, APP_TYPE) VALUES (0, 'NORMAL'), (0, 'WEB_ENTRY'); diff --git a/workflow/engine/data/mysql/schema.sql b/workflow/engine/data/mysql/schema.sql index 481f772f6..6fdb999a8 100644 --- a/workflow/engine/data/mysql/schema.sql +++ b/workflow/engine/data/mysql/schema.sql @@ -2338,73 +2338,6 @@ CREATE TABLE `APP_TIMEOUT_ACTION_EXECUTED` PRIMARY KEY (`APP_UID`,`DEL_INDEX`) )ENGINE=InnoDB ; #----------------------------------------------------------------------------- -#-- ADDONS_STORE -#----------------------------------------------------------------------------- - -DROP TABLE IF EXISTS `ADDONS_STORE`; - - -CREATE TABLE `ADDONS_STORE` -( - `STORE_ID` VARCHAR(32) NOT NULL, - `STORE_VERSION` INTEGER, - `STORE_LOCATION` VARCHAR(2048) NOT NULL, - `STORE_TYPE` VARCHAR(255) NOT NULL, - `STORE_LAST_UPDATED` DATETIME, - PRIMARY KEY (`STORE_ID`) -)ENGINE=InnoDB ; -#----------------------------------------------------------------------------- -#-- ADDONS_MANAGER -#----------------------------------------------------------------------------- - -DROP TABLE IF EXISTS `ADDONS_MANAGER`; - - -CREATE TABLE `ADDONS_MANAGER` -( - `ADDON_ID` VARCHAR(255) NOT NULL, - `STORE_ID` VARCHAR(32) NOT NULL, - `ADDON_NAME` VARCHAR(255) NOT NULL, - `ADDON_NICK` VARCHAR(255) NOT NULL, - `ADDON_DOWNLOAD_FILENAME` VARCHAR(1024), - `ADDON_DESCRIPTION` VARCHAR(2048), - `ADDON_STATE` VARCHAR(255) default '' NOT NULL, - `ADDON_STATE_CHANGED` DATETIME, - `ADDON_STATUS` VARCHAR(255) NOT NULL, - `ADDON_VERSION` VARCHAR(255) NOT NULL, - `ADDON_TYPE` VARCHAR(255) NOT NULL, - `ADDON_PUBLISHER` VARCHAR(255), - `ADDON_RELEASE_DATE` DATETIME, - `ADDON_RELEASE_TYPE` VARCHAR(255), - `ADDON_RELEASE_NOTES` VARCHAR(255), - `ADDON_DOWNLOAD_URL` VARCHAR(2048), - `ADDON_DOWNLOAD_PROGRESS` FLOAT, - `ADDON_DOWNLOAD_MD5` VARCHAR(32), - PRIMARY KEY (`ADDON_ID`,`STORE_ID`), - KEY `indexAddonsType`(`ADDON_TYPE`) -)ENGINE=InnoDB ; -#----------------------------------------------------------------------------- -#-- LICENSE_MANAGER -#----------------------------------------------------------------------------- - -DROP TABLE IF EXISTS `LICENSE_MANAGER`; - - -CREATE TABLE `LICENSE_MANAGER` -( - `LICENSE_UID` VARCHAR(32) NOT NULL, - `LICENSE_USER` VARCHAR(150) default '0' NOT NULL, - `LICENSE_START` INTEGER default 0 NOT NULL, - `LICENSE_END` INTEGER default 0 NOT NULL, - `LICENSE_SPAN` INTEGER default 0 NOT NULL, - `LICENSE_STATUS` VARCHAR(100) default '' NOT NULL, - `LICENSE_DATA` MEDIUMTEXT NOT NULL, - `LICENSE_PATH` VARCHAR(255) default '0' NOT NULL, - `LICENSE_WORKSPACE` VARCHAR(32) default '0' NOT NULL, - `LICENSE_TYPE` VARCHAR(32) default '0' NOT NULL, - PRIMARY KEY (`LICENSE_UID`) -)ENGINE=InnoDB ; -#----------------------------------------------------------------------------- #-- APP_ASSIGN_SELF_SERVICE_VALUE #----------------------------------------------------------------------------- diff --git a/workflow/engine/menus/setup.php b/workflow/engine/menus/setup.php index ddb9ca27c..fa62c7ddf 100755 --- a/workflow/engine/menus/setup.php +++ b/workflow/engine/menus/setup.php @@ -332,29 +332,7 @@ if ($RBAC->userCanAccess('PM_SETUP') === 1) { ); } -if (!file_exists(PATH_DATA_SITE . "plugin.singleton")) { - require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php'; - $enterprise = new enterprisePlugin('enterprise'); - $enterprise->enable(); - $enterprise->setup(); -} - -$licStatusMsg = null; - if ($RBAC->userCanAccess('PM_SETUP') == 1) { - if ( - $RBAC->userCanAccess('PM_SETUP_PLUGINS') === 1 && - $RBAC->userCanAccess('PM_SETUP_ADVANCE') === 1 - ) { - $G_TMP_MENU->AddIdRawOption( - 'PMENTERPRISE', - '../enterprise/addonsStore', - G::LoadTranslation('ID_MENU_NAME') . $licStatusMsg, - '', - '', - 'plugins' - ); - } if ($RBAC->userCanAccess('PM_SETUP_CUSTOM_CASES_LIST') == 1) { $G_TMP_MENU->AddIdRawOption( 'CASES_LIST_SETUP', diff --git a/workflow/engine/methods/cases/ajaxListener.php b/workflow/engine/methods/cases/ajaxListener.php index bafcc234f..d890f3f29 100644 --- a/workflow/engine/methods/cases/ajaxListener.php +++ b/workflow/engine/methods/cases/ajaxListener.php @@ -834,7 +834,6 @@ class Ajax $appUid = $idHistoryArray[1]; $tasUid = $idHistoryArray[2]; - //In enterprise version this snippet of code should be always be executed //In community version this snippet of code is deleted and is executed the next snippet of code $changeLog = new ChangeLogResult(); $result = $changeLog->setAppUid($appUid) diff --git a/workflow/engine/methods/cases/casesListExtJs.php b/workflow/engine/methods/cases/casesListExtJs.php index 36fbb4617..e66a766e4 100644 --- a/workflow/engine/methods/cases/casesListExtJs.php +++ b/workflow/engine/methods/cases/casesListExtJs.php @@ -137,11 +137,6 @@ $category = getCategoryArray(); $columnToSearch = getColumnsSearchArray(); $headPublisher->assign('reassignReaderFields', $reassignReaderFields); //sending the fields to get from proxy $headPublisher->addExtJsScript('cases/reassignList', false); -$enableEnterprise = false; -if (class_exists('enterprisePlugin')) { - $enableEnterprise = true; - $headPublisher->addExtJsScript(PATH_PLUGINS . "enterprise" . PATH_SEP . "advancedTools" . PATH_SEP, false, true); -} //Get user preferences $filters = $conf->getUserPreferences('FILTERS', $userUid); @@ -157,7 +152,6 @@ $headPublisher->assign('statusValues', $status); //Sending the listing of status $headPublisher->assign('processValues', $processes); //Sending the listing of processes $headPublisher->assign('categoryValues', $category); //Sending the listing of categories $headPublisher->assign('solrEnabled', $solrEnabled); //Sending the status of solar -$headPublisher->assign('enableEnterprise', $enableEnterprise); //sending the page size $headPublisher->assign('columnSearchValues', $columnToSearch); //Sending the list of column for search: caseTitle, caseNumber, tasTitle $headPublisher->assign('filtersValues', $filters); //Sending filters defined $headPublisher->assign('workspace', config('system.workspace')); @@ -421,7 +415,6 @@ function getAdditionalFields($action, $confCasesList = []) $arrayConfig = $config->casesListDefaultFieldsAndConfig($action); if (is_array($confCasesList) && count($confCasesList) > 0 && isset($confCasesList["second"]) && count($confCasesList["second"]["data"]) > 0) { - //For the case list builder in the enterprise plugin $caseColumns = []; $caseReaderFields = []; $caseReaderFieldsAux = []; diff --git a/workflow/engine/methods/cases/casesMenuLoader.php b/workflow/engine/methods/cases/casesMenuLoader.php index 89ece6c40..cf1951324 100644 --- a/workflow/engine/methods/cases/casesMenuLoader.php +++ b/workflow/engine/methods/cases/casesMenuLoader.php @@ -7,8 +7,8 @@ switch ($action) { case 'getAllCounters': getAllCounters(); break; - case 'getAllCountersEnterprise': - getAllCountersEnterprise(); + case 'getAllCountersE': + getAllCountersE(); break; default: //this is the starting call getLoadTreeMenuData(); @@ -32,11 +32,8 @@ function getLoadTreeMenuData() $typesId['CASES_SELFSERVICE'] = 'selfservice'; } - $licensedFeatures = PMLicensedFeatures::getSingleton(); - if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) { - $typesId['CONSOLIDATED_CASES'] = 'batch_routing'; - $types[] = 'batch_routing'; - } + $typesId['CONSOLIDATED_CASES'] = 'batch_routing'; + $types[] = 'batch_routing'; $list = []; $list['count'] = ' '; @@ -180,7 +177,7 @@ function getLoadTreeMenuData() die; } -function getAllCountersEnterprise() +function getAllCountersE() { try { $userUid = (isset($_SESSION['USER_LOGGED']) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null; diff --git a/workflow/engine/methods/cases/cases_ShowDocument.php b/workflow/engine/methods/cases/cases_ShowDocument.php index 605a0f618..6426abae7 100644 --- a/workflow/engine/methods/cases/cases_ShowDocument.php +++ b/workflow/engine/methods/cases/cases_ShowDocument.php @@ -106,7 +106,6 @@ if (!$sw_file_exists) { print G::json_encode($res); } else { $nameFile = $oAppDocument->Fields['APP_DOC_FILENAME']; - $licensedFeatures = PMLicensedFeatures::getSingleton(); $downloadStatus = false; $drive = new AppDocumentDrive(); diff --git a/workflow/engine/methods/cases/cases_ShowOutputDocument.php b/workflow/engine/methods/cases/cases_ShowOutputDocument.php index ed12a9db8..35956dfc5 100644 --- a/workflow/engine/methods/cases/cases_ShowOutputDocument.php +++ b/workflow/engine/methods/cases/cases_ShowOutputDocument.php @@ -116,7 +116,6 @@ if (!$sw_file_exists) { print G::json_encode($res); } else { $nameFile = $info['basename'] . $ver . '.' . $ext; - $licensedFeatures = PMLicensedFeatures::getSingleton(); $downloadStatus = false; $drive = new AppDocumentDrive(); diff --git a/workflow/engine/methods/cases/derivatedGmail.php b/workflow/engine/methods/cases/derivatedGmail.php index 3ffd8a230..d06e1e5c0 100644 --- a/workflow/engine/methods/cases/derivatedGmail.php +++ b/workflow/engine/methods/cases/derivatedGmail.php @@ -1,10 +1,5 @@ verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) { - G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels'); - G::header('location: ../login/login'); - die; -} + $caseId = $_SESSION['APPLICATION']; $usrUid = $_SESSION['USER_LOGGED']; $usrName = $_SESSION['USR_FULLNAME']; diff --git a/workflow/engine/methods/cases/main_init.php b/workflow/engine/methods/cases/main_init.php index b0c071eea..15465e36c 100644 --- a/workflow/engine/methods/cases/main_init.php +++ b/workflow/engine/methods/cases/main_init.php @@ -113,7 +113,7 @@ if ($oServerConf->isRtl(SYS_LANG)) { $regionDebug = 'east'; } -$urlProxy = 'casesMenuLoader?action=getAllCountersEnterprise&r='; +$urlProxy = 'casesMenuLoader?action=getAllCountersE&r='; $oHeadPublisher->assign('regionTreePanel', $regionTreePanel); $oHeadPublisher->assign('regionDebug', $regionDebug); diff --git a/workflow/engine/methods/cases/open.php b/workflow/engine/methods/cases/open.php index ff4172f0c..571b0b9d1 100644 --- a/workflow/engine/methods/cases/open.php +++ b/workflow/engine/methods/cases/open.php @@ -6,9 +6,6 @@ * @see cases/cases_CatchExecute.php * @see cases/main_init.php * - * @see dataReportingTools/public_html/js/reportViewer.js - * @see EnterpriseSearch/dynaform_view.js - * * @link https://wiki.processmaker.com/3.2/Cases/Cases#Search_Criteria * @link https://wiki.processmaker.com/3.2/Cases/Cases#Inbox * @link https://wiki.processmaker.com/3.2/Cases/Cases#New_Case diff --git a/workflow/engine/methods/enterprise/addonsStore.php b/workflow/engine/methods/enterprise/addonsStore.php deleted file mode 100644 index 9e487b7a7..000000000 --- a/workflow/engine/methods/enterprise/addonsStore.php +++ /dev/null @@ -1,94 +0,0 @@ -userCanAccess('PM_SETUP_ADVANCE') !== 1 || $RBAC->userCanAccess('PM_SETUP_PLUGINS') !== 1) { - throw new RBACException('ID_ACCESS_DENIED', 403); -} - -AddonsStore::checkLicenseStore(); - -$licenseManager = PmLicenseManager::getSingleton(); -$oHeadPublisher = headPublisher::getSingleton(); - -if (isset($licenseManager->date) && is_array($licenseManager->date)) { - $conf = new Configurations(); - if (!empty(config("system.workspace")) && $conf->exists("ENVIRONMENT_SETTINGS")) { - $licenseManager->date['START'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['START'])); - $licenseManager->date['END'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['END'])); - $licenseManager->date['START'] = $conf->getSystemDate($licenseManager->date['START']); - $licenseManager->date['END'] = $conf->getSystemDate($licenseManager->date['END']); - } else { - $licenseManager->date['START'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['START'])); - $licenseManager->date['END'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['END'])); - $licenseManager->date['START'] = G::getformatedDate($licenseManager->date['START'], 'M d, yyyy', SYS_LANG); - $licenseManager->date['END'] = G::getformatedDate($licenseManager->date['END'], 'M d, yyyy', SYS_LANG); - } -} - -if (isset($licenseManager->result) && $licenseManager->result == "OK") { - $oHeadPublisher->assign("license_start_date", $licenseManager->date["START"]); - $oHeadPublisher->assign("license_end_date", - $licenseManager->expireIn != "NEVER" ? $licenseManager->date["END"] : "NA"); - $oHeadPublisher->assign("license_user", - $licenseManager->info["FIRST_NAME"] . " " . $licenseManager->info["LAST_NAME"] . " (" . $licenseManager->info["DOMAIN_WORKSPACE"] . ")"); - $oHeadPublisher->assign("license_span", - $licenseManager->expireIn != "NEVER" ? ceil($licenseManager->date["SPAN"] / 60 / 60 / 24) : "~"); - $oHeadPublisher->assign("license_name", $licenseManager->type); - $oHeadPublisher->assign("license_server", $licenseManager->server); - $oHeadPublisher->assign("license_expires", $licenseManager->expireIn); - $oHeadPublisher->assign("license_message", $licenseManager->status["message"]); - $oHeadPublisher->assign("licensed", true); -} elseif (isset($licenseManager->info)) { - $oHeadPublisher->assign("license_start_date", $licenseManager->date["START"]); - $oHeadPublisher->assign("license_end_date", $licenseManager->date["END"]); - $oHeadPublisher->assign("license_span", - $licenseManager->expireIn != "NEVER" ? ceil($licenseManager->date["SPAN"] / 60 / 60 / 24) : "~"); - $oHeadPublisher->assign("license_user", - $licenseManager->info["FIRST_NAME"] . " " . $licenseManager->info["LAST_NAME"] . " (" . $licenseManager->info["DOMAIN_WORKSPACE"] . ")"); - $oHeadPublisher->assign("license_name", $licenseManager->type); - $oHeadPublisher->assign("license_server", $licenseManager->server); - $oHeadPublisher->assign("license_expires", $licenseManager->expireIn); - $oHeadPublisher->assign("license_message", $licenseManager->status["message"]); - $oHeadPublisher->assign("licensed", false); -} else { - $oHeadPublisher->assign("license_user", ""); - $oHeadPublisher->assign("license_name", "Unlicensed"); - $oHeadPublisher->assign("license_server", "no server"); - $oHeadPublisher->assign("license_expires", ""); - - $currentLicenseStatus = $licenseManager->getCurrentLicenseStatus(); - - $oHeadPublisher->assign("license_message", $currentLicenseStatus["message"]); - $oHeadPublisher->assign("license_start_date", ""); - $oHeadPublisher->assign("license_end_date", ""); - $oHeadPublisher->assign("license_span", ""); - $oHeadPublisher->assign("licensed", false); -} -$oHeadPublisher->assign("license_serial", - (isset($licenseManager->licenseSerial)) ? $licenseManager->licenseSerial : ''); -$oHeadPublisher->assign("SUPPORT_FLAG", - ((isset($licenseManager->supportStartDate) && $licenseManager->supportStartDate == '') || !isset($licenseManager->supportStartDate)) ? true : false); -$oHeadPublisher->assign("supportStartDate", - (isset($licenseManager->supportStartDate)) ? $licenseManager->supportStartDate : ''); -$oHeadPublisher->assign("supportEndDate", - (isset($licenseManager->supportEndDate)) ? $licenseManager->supportEndDate : ''); - -$oHeadPublisher->assign("PROCESSMAKER_VERSION", System::getVersion()); -$oHeadPublisher->assign("PROCESSMAKER_URL", "/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN); -$oHeadPublisher->assign("SYS_SKIN", SYS_SKIN); -$oHeadPublisher->assign("URL_PART_LOGIN", - ((substr(SYS_SKIN, 0, 2) == "ux" && SYS_SKIN != "uxs") ? "main/login" : "login/login")); -$oHeadPublisher->assign("URL_PART_SETUP", EnterpriseUtils::getUrlPartSetup()); -$oHeadPublisher->assign("PATH_PLUGINS_WRITABLE", ((is_writable(PATH_PLUGINS)) ? 1 : 0)); -$oHeadPublisher->assign("PATH_PLUGINS_WRITABLE_MESSAGE", "The directory " . PATH_PLUGINS . " have not writable."); -$oHeadPublisher->assign("SKIN_IS_UX", EnterpriseUtils::skinIsUx()); -$oHeadPublisher->assign("INTERNET_CONNECTION", EnterpriseUtils::getInternetConnection()); - -$oHeadPublisher->addExtJsScript("enterprise/addonsStore", true); -G::RenderPage("publish", "extJs"); diff --git a/workflow/engine/methods/enterprise/addonsStoreAction.php b/workflow/engine/methods/enterprise/addonsStoreAction.php deleted file mode 100644 index 0476cc01c..000000000 --- a/workflow/engine/methods/enterprise/addonsStoreAction.php +++ /dev/null @@ -1,347 +0,0 @@ -userCanAccess('PM_SETUP_ADVANCE') !== 1 || $RBAC->userCanAccess('PM_SETUP_PLUGINS') !== 1) { - throw new RBACException('ID_ACCESS_DENIED', 403); -} - -function runBgProcessmaker($task, $log) -{ - require_once(PATH_CORE . "bin/tasks/cliAddons.php"); - - $task = str_replace("\"", null, $task); - $data = explode(" ", $task); - - $elem = array_shift($data); //delete first element - - run_addon_core_install($data); -} - -try { - ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) { - throw new ExceptionRestApi($validator->getMessage()); - }); - if (isset($_REQUEST["action"])) { - $action = $_REQUEST["action"]; - } else { - throw (new Exception("Action undefined")); - } - - if (isset($_REQUEST['addon']) && isset($_REQUEST['store'])) { - require_once(PATH_CORE . 'classes/model/AddonsManagerPeer.php'); - - $addon = AddonsManagerPeer::retrieveByPK($_REQUEST['addon'], $_REQUEST['store']); - $addonId = $_REQUEST['addon']; - $storeId = $_REQUEST['store']; - - if ($addon === null) { - throw (new Exception("Unable to find addon (id: '{$_REQUEST['addon']}', store: '{$_REQUEST['store']}')")); - } - } else { - $addon = null; - } - - $result = array(); - - switch (strtolower($action)) { - case "importlicense": - if (sizeof($_FILES) > 0) { - $aInfoLoadFile = $_FILES["upLicense"]; - $aExtentionFile = explode(".", $aInfoLoadFile["name"]); - - //validating the extention before to upload it - if (trim($aExtentionFile[sizeof($aExtentionFile) - 1]) != "dat") { - //G::SendTemporalMessage("ID_ISNT_LICENSE", "tmp-info", "labels"); - $result["errors"] = "Filename does not end with .dat"; - $result["success"] = false; - } else { - $dir = PATH_DATA_SITE; - G::uploadFile($aInfoLoadFile["tmp_name"], $dir, $aInfoLoadFile["name"]); - //reading the file that was uploaded - $oPmLicenseManager = PmLicenseManager::getSingleton(); - $response = $oPmLicenseManager->installLicense($dir . $aInfoLoadFile["name"]); - - /////// - //This command also find the following file "AddonsStore.php" - $licenseManager = PmLicenseManager::getSingleton(); - - preg_match("/^license_(.*).dat$/", $licenseManager->file, $matches); - $realId = urlencode($matches[1]); - - $workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv'; - $addonLocation = "http://{$licenseManager->server}/sys".$workspace."/en/green/services/addonsStore?action=getInfo&licId=$realId"; - - /////// - $cnn = Propel::getConnection("workflow"); - - $oCriteriaSelect = new Criteria("workflow"); - $oCriteriaSelect->add(AddonsStorePeer::STORE_ID, $licenseManager->id); - - $oCriteriaUpdate = new Criteria("workflow"); - $oCriteriaUpdate->add(AddonsStorePeer::STORE_ID, $licenseManager->id); - $oCriteriaUpdate->add(AddonsStorePeer::STORE_LOCATION, $addonLocation); - - BasePeer::doUpdate($oCriteriaSelect, $oCriteriaUpdate, $cnn); - - //are all the plugins that are enabled in the workspace - $pluginRegistry = PluginRegistry::loadSingleton(); - /** @var \ProcessMaker\Plugins\Interfaces\PluginDetail $plugin */ - foreach ($pluginRegistry->getAllPluginsDetails() as $plugin) { - if ($plugin->isEnabled() && !in_array($plugin->getNamespace(), $licenseManager->features)) { - $pluginRegistry->disablePlugin($plugin->getNamespace()); - // In order to keep the custom plugins state, it is required to set the attribute before saving the info - $plugin->setEnabled(true); - $pluginRegistry->savePlugin($plugin->getNamespace()); - } - } - } - } - break; - case "cancel": - if ($addon === null) { - throw new Exception("No addon specified to $action"); - } - if ($addon->getAddonState() == "download") { - $addon->setState("cancel"); - } - break; - case "uninstall": - $status = 1; - - try { - if ($addon === null) { - throw new Exception("No addon specified to $action"); - } - - $r = $addon->uninstall(); - - $result["status"] = "OK"; - } catch (Exception $e) { - $result["message"] = $e->getMessage(); - $status = 0; - } - - if ($status == 0) { - $result["status"] = "ERROR"; - } - break; - case "finish": - if ($addon === null) { - throw new Exception("No addon specified to $action"); - } - $addon->setState(); - break; - case "disable": - case "enable": - if ($addon === null) { - throw new Exception("No addon specified to $action"); - } - - $result["success"] = $addon->setEnabled(($action == "enable")); - - if ($action == "enable") { - G::auditLog("EnablePlugin", "Plugin Name: ".$_REQUEST['addon']); - } else { - G::auditLog("DisablePlugin", "Plugin Name: ".$_REQUEST['addon']); - } - - break; - case "install": - $status = 1; - - try { - if (EnterpriseUtils::getInternetConnection() == 0) { - throw (new Exception("Enterprise Plugins Manager no connected to internet.")); - } - - /////// - $aux = explode("?", $addon->getAddonDownloadUrl()); - $url = $aux[0]; - - if (EnterpriseUtils::checkConnectivity($url) == false) { - throw (new Exception("Server $url not available.")); - } - - if ($addon === null) { - throw new Exception("No addon specified to $action"); - } - - /////// - $workspace = config("system.workspace"); - $dbAdapter = DB_ADAPTER; - - $addon->setAddonState("download-start"); - $addon->save(); - - $log = $addon->getDownloadDirectory() . "/download"; - runBgProcessmaker("addon-install \"$workspace\" \"$storeId\" \"$addonId\" \"$dbAdapter\"", $log); - - //Check if the background process started successfully. - $failed = false; - $max_retries = 15; - $retries = 0; - - while (true) { - sleep(1); - $addon->refresh(); - - if ($addon->getAddonState() != "download-start") { - break; - } - - $retries += 1; - - if ($retries > $max_retries) { - $failed = true; - break; - } - } - - $result["status"] = "OK"; - } catch (Exception $e) { - $result["message"] = $e->getMessage(); - $status = 0; - } - - if ($status == 0) { - $result["status"] = "ERROR"; - } - break; - case "available": - $addonId = $_POST["addonId"]; - - $response = array(); - $status = 1; - - try { - if (EnterpriseUtils::getInternetConnection() == 0) { - throw (new Exception("Enterprise Plugins Manager no connected to internet.")); - } - - /////// - $licenseManager = PmLicenseManager::getSingleton(); - $server = $licenseManager->server; - $workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv'; - $url = "http://$server/sys".$workspace."/en/green/services/rest"; - - if (EnterpriseUtils::checkConnectivity($url) == false) { - throw (new Exception("Server \"$server\" not available.")); - } - - /////// - $boundary = "---------------------" . substr(G::encryptOld(rand(0, 32000)), 0, 10); - $data = null; - - $data = $data . "--$boundary\n"; - $data = $data . "Content-Disposition: form-data; name=\"action\"\n\n" . "requestToSales" . "\n"; - $data = $data . "--$boundary\n"; - $data = $data . "Content-Disposition: form-data; name=\"OBJ_NAME\"\n\n" . $addonId . "\n"; - $data = $data . "--$boundary\n"; - - /////// - //$licenseManager = PmLicenseManager::getSingleton(); - $activeLicense = $licenseManager->getActiveLicense(); - - $data = $data . "Content-Disposition: form-data; name=\"licenseFile\"; filename=\"" . $licenseManager->file . "\"\n"; - $data = $data . "Content-Type: text/plain\n"; - $data = $data . "Content-Transfer-Encoding: binary\n\n"; - $data = $data . file_get_contents($activeLicense["LICENSE_PATH"]) . "\n"; - $data = $data . "--$boundary\n"; - - /////// - $option = array( - "http" => array( - "method" => "POST", - "header" => "Content-Type: multipart/form-data; boundary=" . $boundary, - "content" => $data - ) - ); - - // Proxy settings - $sysConf = System::getSystemConfiguration(); - if ($sysConf['proxy_host'] != '') { - if (!is_array($option['http'])) { - $option['http'] = array(); - } - $option['http']['request_fulluri'] = true; - $option['http']['proxy'] = 'tcp://' . $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''); - if ($sysConf['proxy_user'] != '') { - if (!isset($option['http']['header'])) { - $option['http']['header'] = ''; - } - $option['http']['header'] .= 'Proxy-Authorization: Basic ' . base64_encode($sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : '')); - } - } - - $context = stream_context_create($option); - - /////// - $fileData = file_get_contents($url, false, $context); - - ////////// - $r = G::json_decode($fileData); - - if ($r->status == "OK") { - $response["status"] = $r->status; //OK - } else { - throw (new Exception($r->message)); - } - } catch (Exception $e) { - $response["message"] = $e->getMessage(); - $status = 0; - } - - if ($status == 0) { - $response["status"] = "ERROR"; - } - - echo G::json_encode($response); - exit(0); - break; - case "addonslist": - $type = (isset($_REQUEST['type'])) ? $_REQUEST['type']: 'plugin'; - $result = AddonsStore::addonList($type); - break; - break; - default: - throw (new Exception("Action \"$action\" is not valid")); - } - - if (!isset($result["success"])) { - $result["success"] = true; - } - - if (isset($result["addons"])) { - $result["addons"] = array_values($result["addons"]); - } else { - $result["addons"] = array(); - } - G::outRes(G::json_encode($result)); -} catch (ExceptionRestApi $e) { - $token = strtotime("now"); - PMException::registerErrorLog($e, $token); - G::outRes( - G::json_encode(array( - "success" => false, - "errors" => $e->getMessage() - )) - ); -} catch (Exception $e) { - $token = strtotime("now"); - PMException::registerErrorLog($e, $token); - G::outRes( - G::json_encode(array( - "success" => false, - "errors" => G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) - )) - ); -} diff --git a/workflow/engine/methods/enterprise/enterprise.php b/workflow/engine/methods/enterprise/enterprise.php deleted file mode 100644 index 890d80056..000000000 --- a/workflow/engine/methods/enterprise/enterprise.php +++ /dev/null @@ -1,371 +0,0 @@ -sFriendlyName = "ProcessMaker Enterprise Core Edition"; - $this->sDescription = "ProcessMaker Enterprise Core Edition $VERSION"; - $this->sPluginFolder = "enterprise"; - $this->sSetupPage = "../enterprise/addonsStore.php"; - $this->iVersion = $VERSION; - $this->iPMVersion = "2.0.31"; - $this->aDependences = null; - $this->aWorkspaces = null; - - $this->database = "workflow"; - $this->table = array("ADDONS_STORE", "ADDONS_MANAGER", "LICENSE_MANAGER"); - - if (!isset($_SESSION["__EE_INSTALLATION__"])) { - $_SESSION["__EE_INSTALLATION__"] = 0; - } - - if (!isset($_SESSION["__EE_SW_PMLICENSEMANAGER__"])) { - $_SESSION["__EE_SW_PMLICENSEMANAGER__"] = 1; - } - - $sw = 1; - $msgf = null; - $msgd = null; - - if (file_exists(PATH_CORE . "plugins" . PATH_SEP . "pmLicenseManager.php")) { - $_SESSION["__EE_INSTALLATION__"] = 1; - $_SESSION["__EE_SW_PMLICENSEMANAGER__"] = 0; - - $plugin = "pmLicenseManager"; - $this->pluginUninstall($plugin); - - if (file_exists(PATH_CORE . "plugins" . PATH_SEP . $plugin . ".php") || file_exists(PATH_CORE . "plugins" . PATH_SEP . $plugin)) { - $msgf = $msgf . (($msgf != null)? ", " : null) . $plugin . ".php"; - $msgd = $msgd . (($msgd != null)? ", " : null) . $plugin; - $sw = 0; - } - - $plugin = "enterprise"; - $this->pluginUninstall($plugin); - - if (file_exists(PATH_CORE . "plugins" . PATH_SEP . $plugin . ".php") || file_exists(PATH_CORE . "plugins" . PATH_SEP . $plugin)) { - $msgf = $msgf . (($msgf != null)? ", " : null) . $plugin . ".php"; - $msgd = $msgd . (($msgd != null)? ", " : null) . $plugin; - $sw = 0; - } - - $this->uninstall(); - } else { - $_SESSION["__EE_INSTALLATION__"] = $_SESSION["__EE_INSTALLATION__"] + 1; - } - - if ($sw == 0) { - unset($_SESSION["__EE_INSTALLATION__"]); - unset($_SESSION["__EE_SW_PMLICENSEMANAGER__"]); - - /////// - $js = "window.open(\"/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN . "/setup/main?s=PLUGINS\", \"_top\", \"\");"; - - if (substr(SYS_SKIN, 0, 2) == "ux" && SYS_SKIN != "uxs") { - $js = "window.open(\"/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN . "/main\", \"_top\", \"\");"; - } - - /////// - G::SendMessageText("ProcessMaker Enterprise plug-in can't delete the files \"$msgf\" and directories \"$msgd\" of \"" . (PATH_CORE . "plugins") . "\". Before proceeding with the installation of the plug-in must remove them.", "INFO"); - - echo ""; - exit(0); - } - - if ($_SESSION["__EE_SW_PMLICENSEMANAGER__"] == 0 && $_SESSION["__EE_INSTALLATION__"] == 2) { - unset($_SESSION["__EE_INSTALLATION__"]); - unset($_SESSION["__EE_SW_PMLICENSEMANAGER__"]); - - $this->install(); - } - - /////// - return $res; - } - - public function install() - { - $pluginRegistry = PluginRegistry::loadSingleton(); - - $pluginDetail = $pluginRegistry->getPluginDetails("enterprise.php"); - $pluginRegistry->enablePlugin($pluginDetail->getNamespace()); - - file_put_contents(PATH_DATA_SITE . "plugin.singleton", $pluginRegistry->serializeInstance()); - } - - public function uninstall() - { - } - - public function setup() - { - if (!PluginsRegistryPeer::retrieveByPK(md5('enterprise'))) { - $pluginRegistry = PluginRegistry::loadSingleton(); - $pluginDetail = $pluginRegistry->getPluginDetails("enterprise.php"); - $pluginRegistry->enablePlugin($pluginDetail->getNamespace()); - $pluginRegistry->savePlugin($pluginDetail->getNamespace()); - } - } - - public function enable() - { - $this->setConfiguration(); - - require_once(PATH_CORE . 'classes/model/AddonsStore.php'); - AddonsStore::checkLicenseStore(); - $licenseManager = PmLicenseManager::getSingleton(); - AddonsStore::updateAll(false); - } - - public function disable() - { - } - - public function setConfiguration() - { - $confEeUid = "enterpriseConfiguration"; - - $criteria = new Criteria("workflow"); - - $criteria->addSelectColumn(ConfigurationPeer::CFG_VALUE); - $criteria->add(ConfigurationPeer::CFG_UID, "EE"); - $criteria->add(ConfigurationPeer::OBJ_UID, $confEeUid); - - $rsCriteria = ConfigurationPeer::doSelectRS($criteria); - - if (!$rsCriteria->next()) { - $conf = new Configuration(); - - $data = array("internetConnection" => 1); - - $conf->create( - array( - "CFG_UID" => "EE", - "OBJ_UID" => $confEeUid, - "CFG_VALUE" => serialize($data), - "PRO_UID" => "", - "USR_UID" => "", - "APP_UID" => "" - ) - ); - } - } - - public function pluginUninstall($pluginName) - { - //define("PATH_PLUGINS", PATH_CORE . "plugins" . PATH_SEP); - - if (file_exists(PATH_CORE . "plugins" . PATH_SEP . $pluginName . ".php")) { - require_once(PATH_CORE . "plugins" . PATH_SEP . $pluginName . ".php"); - - $pluginRegistry = PluginRegistry::loadSingleton(); - - $pluginDetail = $pluginRegistry->getPluginDetails($pluginName . ".php"); - - if ($pluginDetail) { - $pluginRegistry->enablePlugin($pluginDetail->getNamespace()); - $pluginRegistry->disablePlugin($pluginDetail->getNamespace()); - - /////// - $className = $pluginDetail->getClassName(); - $plugin = new $className($pluginDetail->getNamespace(), $pluginDetail->getFile()); - //$this->_aPlugins[$pluginDetail->sNamespace] = $plugin; - - if (method_exists($plugin, "uninstall")) { - $plugin->uninstall(); - } - - /////// - $pluginRegistry->savePlugin($pluginDetail->getNamespace()); - } - - /////// - unlink(PATH_CORE . "plugins" . PATH_SEP . $pluginName . ".php"); - - if (file_exists(PATH_CORE . "plugins" . PATH_SEP . $pluginName)) { - G::rm_dir(PATH_CORE . "plugins" . PATH_SEP . $pluginName); - } - } - } - - /** - * Registeres the plugin in the enterprise data - * Note, this utilizes caching to reduce the burden of the file I/O on the ee file. However, this does - * require caching to be enabled. - */ - public function registerEE($pluginFile, $pluginVersion) - { - $cacheKey = config('system.workspace') . 'enterprise.ee'; - // Fetch the value from cache. If not present, fetch from the filesystem. - $value = Cache::get($cacheKey, function () use($cacheKey) { - if (file_exists(PATH_DATA_SITE . "ee")) { - $contents = trim(file_get_contents(PATH_DATA_SITE . "ee")); - // Store it in cache so it can be used in the future - Cache::forever($cacheKey, $contents); - return $contents; - } else { - return null; - } - }); - - if ($value) { - $this->systemAvailable = unserialize($value); - } else { - // Handle potential no value - $this->systemAvailable = []; - } - - $filename = $pluginFile . '-' . $pluginVersion . '.tar'; - - // Check to see if update is required - if ( - !isset($this->systemAvailable[$pluginFile]) || - !isset($this->systemAvailable[$pluginFile]['sFilename']) || - $this->systemAvailable[$pluginFile]['sFilename'] != $filename - ) { - // Update required - $this->systemAvailable[$pluginFile]["sFilename"] = $filename; - file_put_contents(PATH_DATA_SITE . "ee", serialize($this->systemAvailable)); - // Put in cache as well - Cache::forever($cacheKey, serialize($this->systemAvailable)); - } - return true; - } - - public function checkDependencies() - { - } - - public function tableBackup($tableBackup, $backupPrefix = "_", $backupSuffix = "_TEMP") - { - //Database Connections - $cnn = Propel::getConnection($this->database); - $stmt = $cnn->createStatement(); - - foreach ($tableBackup as $key => $table) { - $tablebak = $backupPrefix . $table . $backupSuffix; - - //First Search if the Table exists - $sqlTable = "SHOW TABLES LIKE '$table'"; - $rsTable = $stmt->executeQuery($sqlTable, ResultSet::FETCHMODE_ASSOC); - if ($rsTable->getRecordCount() > 0) { - //Table $table exists, so we can Backup - //If there are records in $table Backup - $sqlSelectTable = "SELECT * FROM $table"; - $rsSelectTable = $stmt->executeQuery($sqlSelectTable, ResultSet::FETCHMODE_ASSOC); - if ($rsSelectTable->getRecordCount() > 0) { - //There are records in $table!! Backup! - //Delete a previous Backup if exists - $sql = "DROP TABLE IF EXISTS $tablebak;"; - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - - //Create a COPY of $table in $tablebak :: Backup - $sql = "CREATE TABLE $tablebak SELECT * FROM $table"; - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - - //Delete a previous $table if exists - $sql = "DROP TABLE IF EXISTS $table;"; - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - } - } - } - } - - public function tableBackupRestore($tableBackup, $backupPrefix = "_", $backupSuffix = "_TEMP") - { - //Database Connections - $cnn = Propel::getConnection($this->database); - $stmt = $cnn->createStatement(); - - foreach ($tableBackup as $key => $table) { - $tablebak = $backupPrefix . $table . $backupSuffix; - - //First Search if the $tablebak exists - $sqlTablebak = "SHOW TABLES LIKE '$tablebak'"; - $rsTablebak = $stmt->executeQuery($sqlTablebak, ResultSet::FETCHMODE_ASSOC); - if ($rsTablebak->getRecordCount() > 0) { - //Table $tablebak exists, so we can Restore - $sqlSelectTablebak = "SELECT * FROM $tablebak"; - $rsSelectTablebak = $stmt->executeQuery($sqlSelectTablebak, ResultSet::FETCHMODE_ASSOC); - if ($rsSelectTablebak->getRecordCount() > 0) { - $strTable = str_replace("_", " ", strtolower($table)); - $strTable = str_replace(" ", null, ucwords($strTable)); - - require_once(PATH_PLUGINS . "enterprise" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "$strTable.php"); - - while ($rsSelectTablebak->next()) { - $row = $rsSelectTablebak->getRow(); - - //INSERT INTO TABLEN(FIELD1, FIELD2) VALUES('VALUE1', 'VALUE2') - $oTable = new $strTable(); - $oTable->fromArray($row, BasePeer::TYPE_FIELDNAME); //Fill an object from of the array //Fill attributes - $oTable->save(); - } - } - - //Delete Backup - $sql = "DROP TABLE IF EXISTS $tablebak;"; - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - } - } - } - - public function sqlExecute($sqlFile) - { - $file = fopen($sqlFile, "r"); - - if ($file) { - $line = null; - - while (!feof($file)) { - $buffer = trim(fgets($file, 4096)); //Read a line. - - if (strlen($buffer) > 0 && $buffer[0] != "#") { - //Check for valid lines - $line = $line . $buffer; - - if ($buffer[strlen($buffer) - 1] == ";") { - $cnn = Propel::getConnection($this->database); - $stmt = $cnn->createStatement(); - $rs = $stmt->executeQuery($line, ResultSet::FETCHMODE_NUM); - $line = null; - } - } - } - - fclose($file); - } - } -} - -$oPluginRegistry = PluginRegistry::loadSingleton(); -$oPluginRegistry->registerPlugin('enterprise', __FILE__); //<- enterprise string must be in single quote, otherwise generate error - -//since we are placing pmLicenseManager and EE together.. after register EE, we need to require_once the pmLicenseManager -//if( !defined("PATH_PM_LICENSE_MANAGER") ) { -// define("PATH_PM_LICENSE_MANAGER", PATH_CORE . "/plugins/pmLicenseManager/"); -//} -//set_include_path( -// PATH_PM_LICENSE_MANAGER.PATH_SEPARATOR. -// get_include_path() -//); diff --git a/workflow/engine/methods/enterprise/enterpriseAjax.php b/workflow/engine/methods/enterprise/enterpriseAjax.php deleted file mode 100644 index 97f4e6770..000000000 --- a/workflow/engine/methods/enterprise/enterpriseAjax.php +++ /dev/null @@ -1,70 +0,0 @@ -addSelectColumn(ConfigurationPeer::CFG_VALUE); - $criteria->add(ConfigurationPeer::CFG_UID, "EE"); - $criteria->add(ConfigurationPeer::OBJ_UID, $confEeUid); - - $rsCriteria = ConfigurationPeer::doSelectRS($criteria); - - if ($rsCriteria->next()) { - $row = $rsCriteria->getRow(); - - $data = unserialize($row[0]); - - $data["internetConnection"] = $swInternetConnection; - - //Update values - $criteria1 = new Criteria("workflow"); - - $criteria1->add(ConfigurationPeer::CFG_UID, "EE"); - $criteria1->add(ConfigurationPeer::OBJ_UID, $confEeUid); - - //Update set - $criteria2 = new Criteria("workflow"); - - $criteria2->add(ConfigurationPeer::CFG_VALUE, serialize($data)); - - BasePeer::doUpdate($criteria1, $criteria2, Propel::getConnection("workflow")); - } else { - $conf = new Configuration(); - $data = array("internetConnection" => $swInternetConnection); - $conf->create( - array( - "CFG_UID" => "EE", - "OBJ_UID" => $confEeUid, - "CFG_VALUE" => serialize($data), - "PRO_UID" => "", - "USR_UID" => "", - "APP_UID" => "" - ) - ); - } - - $response["status"] = "OK"; - } catch (Exception $e) { - $response["message"] = $e->getMessage(); - $status = 0; - } - - if ($status == 0) { - $response["status"] = "ERROR"; - } - break; -} -echo G::json_encode($response); - diff --git a/workflow/engine/methods/enterprise/pluginsImportFile.php b/workflow/engine/methods/enterprise/pluginsImportFile.php deleted file mode 100644 index 627a66672..000000000 --- a/workflow/engine/methods/enterprise/pluginsImportFile.php +++ /dev/null @@ -1,144 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - -global $RBAC; - -use ProcessMaker\Plugins\PluginRegistry; -use ProcessMaker\Validation\ValidationUploadedFiles; - -$RBAC->requirePermissions("PM_SETUP_ADVANCE"); -require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php'; - -$response = array(); -$status = 1; - -try { - ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) { - throw new Exception($validator->getMessage()); - }); - - if (!isset($_FILES["form"]["error"]["PLUGIN_FILENAME"]) || $_FILES["form"]["error"]["PLUGIN_FILENAME"] == 1) { - $str = "There was an error uploading the file, probably the file size if greater than upload_max_filesize parameter in php.ini, please check this parameter and try again."; - throw (new Exception($str)); - } - - //save the file - if ($_FILES["form"]["error"]["PLUGIN_FILENAME"] == 0) { - $filename = $_FILES["form"]["name"]["PLUGIN_FILENAME"]; - $path = PATH_DOCUMENT . "input" . PATH_SEP ; - $tempName = $_FILES["form"]["tmp_name"]["PLUGIN_FILENAME"]; - G::uploadFile($tempName, $path, $filename ); - } - - if (!$_FILES["form"]["type"]["PLUGIN_FILENAME"] == "application/octet-stream") { - $str = "the uploaded files are invalid, expected \"application/octect-stream\" mime type file (". $_FILES["form"]["type"]["PLUGIN_FILENAME"] . ")"; - throw (new Exception($str)); - } - - - $tar = new Archive_Tar($path. $filename); - $sFileName = substr($filename, 0, strrpos($filename, ".")); - $sClassName = substr($filename, 0, strpos($filename, "-")); - - $aFiles = $tar->listContent(); - $bMainFile = false; - $bClassFile = false; - - if (is_array($aFiles)) { - foreach ($aFiles as $key => $val) { - if ($val["filename"] == $sClassName . ".php") { - $bMainFile = true; - } - if ($val["filename"] == $sClassName . PATH_SEP . "class." . $sClassName . ".php") { - $bClassFile = true; - } - } - } else { - $str = "Failed to import the file default by doesn't a plugin or invalid file."; - throw (new Exception($str)); - } - - $oPluginRegistry = PluginRegistry::loadSingleton(); - $pluginFile = $sClassName . '.php'; - - if ($bMainFile && $bClassFile) { - $sAux = $sClassName . 'Plugin'; - $fVersionOld = 0.0; - if (file_exists(PATH_PLUGINS . $pluginFile)) { - if (!class_exists($sAux) && !class_exists($sClassName . 'plugin')) { - include PATH_PLUGINS . $pluginFile; - } - if (!class_exists($sAux)) { - $sAux = $sClassName . 'plugin'; - } - $oClass = new $sAux($sClassName); - $fVersionOld = $oClass->iVersion; - unset($oClass); - } - - $res = $tar->extract($path); - - //Verify if not is Enterprise Plugin - if (!$oPluginRegistry->isEnterprisePlugin($sClassName, $path)) { - throw new Exception(G::LoadTranslation('ID_EEPLUGIN_IMPORT_PLUGIN_NOT_IS_ENTERPRISE', [$filename])); - } - - $res = $tar->extract(PATH_PLUGINS); - } else { - $str = "The file $filename doesn't contain class: $sClassName "; - throw (new Exception($str)); - } - - if (! file_exists(PATH_PLUGINS . $sClassName . '.php')) { - $str = "File '$pluginFile' doesn't exists "; - throw (new Exception($str)); - } - - require_once (PATH_PLUGINS . $pluginFile); - - $oPluginRegistry->registerPlugin($sClassName, PATH_PLUGINS . $sClassName . ".php"); - - $details = $oPluginRegistry->getPluginDetails($pluginFile); - - $oPluginRegistry->installPlugin($details->getNamespace()); - $oPluginRegistry->setupPlugins(); //get and setup enabled plugins - $oPluginRegistry->savePlugin($details->getNamespace()); - - //G::header("Location: pluginsList"); - //die; - - $response["success"] = true; -} catch (Exception $e) { - $response["message"] = $e->getMessage(); - $status = 0; -} - -if ($status == 0) { - $response["success"] = false; -} - -G::outRes( G::json_encode($response) ); - diff --git a/workflow/engine/methods/enterprise/pluginsSetup.php b/workflow/engine/methods/enterprise/pluginsSetup.php deleted file mode 100644 index 59e700ac1..000000000 --- a/workflow/engine/methods/enterprise/pluginsSetup.php +++ /dev/null @@ -1,36 +0,0 @@ -getPluginDetails( $pluginFile ); -$folder = $details->getFolder(); -$xmlform = (isset($folder)) ? $folder . '/' . $details->getSetupPage() : ''; - -$G_MAIN_MENU = 'processmaker'; -$G_ID_MENU_SELECTED = 'SETUP'; -$G_SUB_MENU = 'setup'; -$G_ID_SUB_MENU_SELECTED = 'PLUGINS'; -$G_PUBLISH = new Publisher; -try { - //the setup page is a special page - if (substr($xmlform,-4) == '.php' && file_exists(PATH_PLUGINS . $xmlform)) { - require_once ( PATH_PLUGINS . $xmlform ); - die; - } - //the setup page is a xmlform and using the default showform and saveform function to serialize data - if (!file_exists(PATH_PLUGINS.$xmlform.'.xml')) { - throw ( new Exception ('setup .xml file is not defined for this plugin') ); - } - - $Fields = $oPluginRegistry->getFieldsForPageSetup( $details->getNamespace() ); - $G_PUBLISH->AddContent( 'xmlform', 'xmlform', $xmlform, '',$Fields ,'pluginsSetupSave?id='.$pluginFile ); -} catch (Exception $e) { - $aMessage['MESSAGE'] = $e->getMessage(); - $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage ); -} -G::RenderPage('publishBlank', 'blank'); - diff --git a/workflow/engine/methods/enterprise/processMakerAjax.php b/workflow/engine/methods/enterprise/processMakerAjax.php deleted file mode 100644 index dfc3637a0..000000000 --- a/workflow/engine/methods/enterprise/processMakerAjax.php +++ /dev/null @@ -1,380 +0,0 @@ -userCanAccess('PM_SETUP_ADVANCE') !== 1) { - throw new RBACException('ID_ACCESS_DENIED', 403); -} - -ini_set("max_execution_time", 0); - -if (!defined("PM_VERSION")) { - if (file_exists(PATH_METHODS . "login/version-pmos.php")) { - include(PATH_METHODS . "login/version-pmos.php"); - } else { - define("PM_VERSION", "2.0.0"); - } -} - -if (!defined("BUFSIZE")) { - define("BUFSIZE", 16384); -} - - -function install($file) -{ - $result = array(); - $status = 1; - - try { - //Extract - $tar = new Archive_Tar($file); - - $swTar = $tar->extract(PATH_OUTTRUNK); //true on success, false on error. //directory for extract - //$swTar = $tar->extract(PATH_PLUGINS); - - if (!$swTar) { - throw (new Exception("Could not extract file.")); - } - - //Upgrade - $option = array( - "http" => array( - "method" => "POST" - ) - ); - - // Proxy settings - $sysConf = System::getSystemConfiguration(); - if (isset($sysConf['proxy_host'])) { - if ($sysConf['proxy_host'] != '') { - if (!is_array($option['http'])) { - $option['http'] = array(); - } - $option['http']['request_fulluri'] = true; - $option['http']['proxy'] = 'tcp://' . $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''); - if ($sysConf['proxy_user'] != '') { - if (!isset($option['http']['header'])) { - $option['http']['header'] = ''; - } - $option['http']['header'] .= 'Proxy-Authorization: Basic ' . base64_encode($sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : '')); - } - } - } - - $context = stream_context_create($option); - - /////// - $fileData = @fopen(EnterpriseUtils::getUrlServerName() . "/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN . "/enterprise/services/processMakerUpgrade", "rb", false, $context); - - if ($fileData === false) { - throw (new Exception("Could not open services url.")); - } - - $resultAux = G::json_decode(stream_get_contents($fileData)); - - if ($resultAux->status == "OK") { - $result["status"] = $resultAux->status; //OK - $result["message"] = $resultAux->message; - } else { - throw (new Exception($resultAux->message)); - } - } catch (Exception $e) { - $result["message"] = $e->getMessage(); - $status = 0; - } - - if ($status == 0) { - $result["status"] = "ERROR"; - } - - return $result; -} - - - - - -$option = (isset($_POST["option"]))? $_POST["option"] : null; - -switch ($option) { - case "install": - $uid = $_POST["uid"]; - $version = $_POST["version"]; - $versionName = $_POST["versionName"]; - $processMakerVersion = $_POST["processMakerVersion"]; - - $response = array(); - $status = 1; - - try { - if (EnterpriseUtils::getInternetConnection() == 0) { - throw (new Exception("Enterprise Plugins Manager no connected to internet.")); - } - - /////// - $versionName = EnterpriseUtils::pmVersion($versionName); - $processMakerVersion = EnterpriseUtils::pmVersion($processMakerVersion); - - if (!version_compare($processMakerVersion . "", $versionName . "", "<")) { - throw (new Exception("The system can't be upgraded to a previous version.")); - } - - /////// - $licenseManager = PmLicenseManager::getSingleton(); - $server = isset($licenseManager->server) ? $licenseManager->server : ''; - $workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv'; - - $url = "http://$server/sys".$workspace."/en/green/services/rest"; - - if (EnterpriseUtils::checkConnectivity($url) == false) { - throw (new Exception("Server '$server' not available.")); - } - - /////// - $boundary = "---------------------" . substr(G::encryptOld(rand(0, 32000)), 0, 10); - $data = null; - - $data = $data . "--$boundary\n"; - $data = $data . "Content-Disposition: form-data; name=\"action\"\n\n" . "getPM" . "\n"; - $data = $data . "--$boundary\n"; - $data = $data . "Content-Disposition: form-data; name=\"OBJ_UID\"\n\n" . $uid . "\n"; - $data = $data . "--$boundary\n"; - $data = $data . "Content-Disposition: form-data; name=\"OBJ_VERSION\"\n\n" . $version . "\n"; - $data = $data . "--$boundary\n"; - - $option = array( - "http" => array( - "method" => "POST", - "header" => "Content-Type: multipart/form-data; boundary=" . $boundary, - "content" => $data - ) - ); - - // Proxy settings - $sysConf = System::getSystemConfiguration(); - if (isset($sysConf['proxy_host'])) { - if ($sysConf['proxy_host'] != '') { - if (!is_array($option['http'])) { - $option['http'] = array(); - } - $option['http']['request_fulluri'] = true; - $option['http']['proxy'] = 'tcp://' . $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''); - if ($sysConf['proxy_user'] != '') { - if (!isset($option['http']['header'])) { - $option['http']['header'] = ''; - } - $option['http']['header'] .= 'Proxy-Authorization: Basic ' . base64_encode($sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : '')); - } - } - } - - $context = stream_context_create($option); - - /////// - $fileData = @fopen($url, "rb", false, $context); - - if ($fileData === false) { - throw (new Exception("Could not open download url.")); - } - - //Try to get the download size and filename (ok if it fails) - $meta = stream_get_meta_data($fileData); - - $fileName = null; - $fileContentType = null; - $fileLength = 0; - - if ($meta["wrapper_type"] == "http") { - foreach ($meta["wrapper_data"] as $info) { - $info = explode(":", $info); - $infoVariable = (isset($info[0]))? trim($info[0]) : null; - $infoValue = (isset($info[1]))? trim($info[1]) : null; - - if (preg_match("/^.*Content-Type.*$/", $infoVariable)) { - $fileContentType = $infoValue; - } - - if (strcasecmp($infoVariable, "Content-Length") == 0) { - $fileLength = intval($infoValue); - } - - if (strcasecmp($infoVariable, "Content-Disposition") == 0) { - foreach (explode(";", $infoValue) as $params) { - $params = explode("=", $params); - - if (count($params) <= 1) { - continue; - } - - if (strcasecmp(trim($params[0]), "filename") == 0) { - $fileName = trim($params[1], "\" "); - } - } - } - } - } - - if (preg_match("/^.*json.*$/i", $fileContentType)) { - $r = G::json_decode(stream_get_contents($fileData)); - - if ($r->status == "ERROR") { - throw (new Exception($r->message)); - } - } - - /////// - $dir = PATH_DATA . "upgrade" . PATH_SEP . "processmaker"; - - G::rm_dir($dir); - G::mk_dir($dir); - - if (!file_exists($dir)) { - throw (new Exception("Could not create destination directory.")); - } - - /////// - $fileName = $dir . PATH_SEP . $fileName; - - $file = @fopen($fileName, "wb"); - - if ($file === false) { - throw (new Exception("Could not open destination file.")); - } - - while (!feof($fileData)) { - $data = fread($fileData, BUFSIZE); - - //Just to be safe, check all error conditions - if ($data === "" || $data === false) { - break; - } - - if (fwrite($file, $data) === false) { - break; - } - } - - fclose($file); - fclose($fileData); - - /////// - $path = PATH_TRUNK; - //$path = PATH_OUTTRUNK; - - if (EnterpriseUtils::checkFolderPermissions($path, true) == false) { - $str = $path . " " . "directory, its sub-directories or file is not writable. Read the wiki for Upgrading ProcessMaker.
The file is downloaded in " . $fileName . "
"; - throw (new Exception($str)); - } - - /////// - $result = install($fileName); - - if ($result["status"] == "OK") { - $response["status"] = $result["status"]; //OK - $response["message"] = $result["message"]; - G::auditLog("InstallPlugin", "Plugin Name: ".$file); - } else { - throw (new Exception($result["message"])); - } - } catch (Exception $e) { - $response["message"] = $e->getMessage(); - $status = 0; - } - - if ($status == 0) { - $response["status"] = "ERROR"; - } - echo G::json_encode($response); - break; - case "list": - $status = 1; - $response = new stdclass(); - $response->status = 'OK'; - try { - if (EnterpriseUtils::getInternetConnection() == 0) { - throw (new Exception("Enterprise Plugins Manager no connected to internet.")); - } - - /////// - $licenseManager = PmLicenseManager::getSingleton(); - $server = (isset($licenseManager->server)) ? $licenseManager->server : ''; - $workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv'; - - $url = "http://$server/sys".$workspace."/en/green/services/rest"; - - if (EnterpriseUtils::checkConnectivity($url) == false) { - throw (new Exception("Server '$server' not available.")); - } - - /////// - $option = array( - "http" => array( - "method" => "POST", - "header" => "Content-type: application/x-www-form-urlencoded\r\n", - "content" => http_build_query( - array( - "action" => "getPMList" - ) - ) - ) - ); - - // Proxy settings - $sysConf = System::getSystemConfiguration(); - if (isset($sysConf['proxy_host'])) { - if ($sysConf['proxy_host'] != '') { - if (!is_array($option['http'])) { - $option['http'] = array(); - } - $option['http']['request_fulluri'] = true; - $option['http']['proxy'] = 'tcp://' . $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''); - if ($sysConf['proxy_user'] != '') { - if (!isset($option['http']['header'])) { - $option['http']['header'] = ''; - } - $option['http']['header'] .= 'Proxy-Authorization: Basic ' . base64_encode($sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : '')); - } - } - } - - $context = stream_context_create($option); - - $results = file_get_contents($url, false, $context); - $results = G::json_decode($results); - $results = isset($results[0]) ? $results[0] :array(); - - $pmVersion = EnterpriseUtils::pmVersion(PM_VERSION); - $versions = array(); - - foreach ($results as $key => $result) { - $version = EnterpriseUtils::pmVersion($result->OBJ_VERSION_NAME); - - if (version_compare($pmVersion . "", $version . "", "<")) { - $versions[] = $result; - } - } - - if (isset($results[0])) { - $results[0]->OBJ_VERSION_NAME .= " (Stable)"; - } - - $response->status = "OK"; - $response->results = $versions; - } catch (Exception $e) { - $response->message = $e->getMessage(); - $status = 0; - } - - if ($status == 0) { - $response->status = "ERROR"; - } - - echo G::json_encode($response); - break; -} diff --git a/workflow/engine/methods/login/authentication.php b/workflow/engine/methods/login/authentication.php index a4c5d809d..b95920f11 100644 --- a/workflow/engine/methods/login/authentication.php +++ b/workflow/engine/methods/login/authentication.php @@ -45,14 +45,6 @@ try { $pwd = rtrim($frm['USR_PASSWORD']); } - require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php'; - - if (!file_exists(PATH_DATA_SITE . "plugin.singleton")) { - $enterprise = new enterprisePlugin('enterprise'); - $enterprise->enable(); - $enterprise->setup(); - } - Cache::put('ldapMessageError', '', 120); //laravel 8.x the time parameter is in seconds. $uid = $RBAC->VerifyLogin($usr, $pwd); $ldapMessageError = Cache::pull('ldapMessageError'); @@ -182,7 +174,6 @@ try { if ($oPluginRegistry->existsTrigger ( PM_LOGIN )) { $oPluginRegistry->executeTriggers ( PM_LOGIN , $loginInfo ); } - EnterpriseClass::enterpriseSystemUpdate($loginInfo); initUserSession($uid, $usr); } else { setcookie('singleSignOn', '1', $cookieOptions); diff --git a/workflow/engine/methods/login/licenseUpdate.php b/workflow/engine/methods/login/licenseUpdate.php deleted file mode 100644 index 9bd055023..000000000 --- a/workflow/engine/methods/login/licenseUpdate.php +++ /dev/null @@ -1,60 +0,0 @@ -installLicense($dir . $aInfoLoadFile["name"], false, false); - - if ($response) { - $licenseManager = new PmLicenseManager(); - preg_match("/^license_(.*).dat$/", $licenseManager->file, $matches); - $realId = urlencode($matches[1]); - $workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv'; - - $addonLocation = "http://{$licenseManager->server}/sys".$workspace."/en/green/services/addonsStore?action=getInfo&licId=$realId"; - - /////// - $cnn = Propel::getConnection("workflow"); - - $oCriteriaSelect = new Criteria("workflow"); - $oCriteriaSelect->add(AddonsStorePeer::STORE_ID, $licenseManager->id); - - $oCriteriaUpdate = new Criteria("workflow"); - $oCriteriaUpdate->add(AddonsStorePeer::STORE_ID, $licenseManager->id); - $oCriteriaUpdate->add(AddonsStorePeer::STORE_LOCATION, $addonLocation); - - BasePeer::doUpdate($oCriteriaSelect, $oCriteriaUpdate, $cnn); - - //are all the plugins that are enabled in the workspace - $pluginRegistry = PluginRegistry::loadSingleton(); - /** @var \ProcessMaker\Plugins\Interfaces\PluginDetail $plugin */ - foreach ($pluginRegistry->getAllPluginsDetails() as $plugin) { - if ($plugin->isEnabled() && !in_array($plugin->getNamespace(), $licenseManager->features)) { - $pluginRegistry->disablePlugin($plugin->getNamespace()); - // In order to keep the custom plugins state, it is required to set the attribute before saving the info - $plugin->setEnabled(true); - $pluginRegistry->savePlugin($plugin->getNamespace()); - } - } - - G::SendTemporalMessage('ID_NLIC', 'info'); - } else { - G::SendTemporalMessage('ID_WARNING_ENTERPRISE_LICENSE_MSG', 'warning'); - } -} - -G::header('Location: ../login/login'); -die(); diff --git a/workflow/engine/methods/login/updateTimezone.php b/workflow/engine/methods/login/updateTimezone.php index e83c65bd3..fb7f05876 100644 --- a/workflow/engine/methods/login/updateTimezone.php +++ b/workflow/engine/methods/login/updateTimezone.php @@ -1,7 +1,6 @@ verifyfeature('oq3S29xemxEZXJpZEIzN01qenJUaStSekY4cTdJVm5vbWtVM0d4S2lJSS9qUT0=')) { // Update User Time Zone if (isset($_POST['form']['BROWSER_TIME_ZONE'])) { $user = new Users(); @@ -12,4 +11,3 @@ if (PMLicensedFeatures::getSingleton()->verifyfeature('oq3S29xemxEZXJpZEIzN01qen // Redirect to origin page G::header('Location: ' . $_SERVER['HTTP_REFERER']); -} diff --git a/workflow/engine/methods/services/ActionsByEmail.php b/workflow/engine/methods/services/ActionsByEmail.php index 5688bde5c..70a2d1de4 100644 --- a/workflow/engine/methods/services/ActionsByEmail.php +++ b/workflow/engine/methods/services/ActionsByEmail.php @@ -3,7 +3,6 @@ use ProcessMaker\ChangeLog\ChangeLog; if (isset($_GET['BROWSER_TIME_ZONE_OFFSET'])) { - if (PMLicensedFeatures::getSingleton()->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) { // since all the request parameters using this script are encrypted // using the URL_KEY the probability of injecting any kind of code using // this entry point are only possible knowing the aforementioned key. @@ -139,7 +138,6 @@ if (isset($_GET['BROWSER_TIME_ZONE_OFFSET'])) { G::RenderPage('publish', 'blank'); break; } - } } else { ?> diff --git a/workflow/engine/methods/services/ActionsByEmailDataForm.php b/workflow/engine/methods/services/ActionsByEmailDataForm.php index 740df7203..7a525ff68 100644 --- a/workflow/engine/methods/services/ActionsByEmailDataForm.php +++ b/workflow/engine/methods/services/ActionsByEmailDataForm.php @@ -1,6 +1,5 @@ verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) { global $G_PUBLISH; $G_PUBLISH = new Publisher(); @@ -101,7 +100,6 @@ if (isset($_GET['BROWSER_TIME_ZONE_OFFSET'])) { } G::RenderPage('publish', 'blank'); - } } else { ?> diff --git a/workflow/engine/methods/services/ActionsByEmailDataFormPost.php b/workflow/engine/methods/services/ActionsByEmailDataFormPost.php index bf11d5475..8e9463d22 100644 --- a/workflow/engine/methods/services/ActionsByEmailDataFormPost.php +++ b/workflow/engine/methods/services/ActionsByEmailDataFormPost.php @@ -9,10 +9,6 @@ use ProcessMaker\BusinessModel\Cases as BmCases; use ProcessMaker\Core\JobsManager; use ProcessMaker\Validation\ValidationUploadedFiles; -$featureEnable = PMLicensedFeatures::getSingleton() - ->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0='); -if ($featureEnable) { - /** * To do: The following evaluation must be moved after saving the data (so as not to lose the data entered in the form). * It only remains because it is an old behavior, which must be defined by "Product Owner". @@ -87,5 +83,4 @@ if ($featureEnable) { $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', ['MESSAGE' => $error->getMessage() . ' Please contact to your system administrator.']); } $_SESSION = unserialize($backupSession); - G::RenderPage('publish', 'blank'); -} \ No newline at end of file + G::RenderPage('publish', 'blank'); \ No newline at end of file diff --git a/workflow/engine/methods/setup/mainAjax.php b/workflow/engine/methods/setup/mainAjax.php index 5b3c1fd6b..2520eac3e 100644 --- a/workflow/engine/methods/setup/mainAjax.php +++ b/workflow/engine/methods/setup/mainAjax.php @@ -51,13 +51,6 @@ switch ($request) { if ($_GET["menu"] == "plugins") { $i = 0; - foreach ($items as $index => $value) { - if ($items[$index]["id"] == "PMENTERPRISE") { - $i = $index; - break; - } - } - $itemAux = $items[$i]; array_splice( $items, $i, 1 ); diff --git a/workflow/engine/methods/setup/pluginsChange.php b/workflow/engine/methods/setup/pluginsChange.php index da682d50a..ff3ccd5db 100644 --- a/workflow/engine/methods/setup/pluginsChange.php +++ b/workflow/engine/methods/setup/pluginsChange.php @@ -34,28 +34,6 @@ if ($handle = opendir(PATH_PLUGINS)) { $pluginName = str_replace(".php", "", $pluginFile); if (is_file(PATH_PLUGINS . $pluginName . ".php") && is_dir(PATH_PLUGINS . $pluginName)) { - - if (!$oPluginRegistry->isEnterprisePlugin($pluginName)) { - //Check disabled code - $arrayFoundDisabledCode = []; - $cs = new CodeScanner(config("system.workspace")); - if (in_array('enable_plugin', $cs->getScope())) { - $arrayFoundDisabledCode = array_merge( - $cs->checkDisabledCode("FILE", PATH_PLUGINS . $pluginName . ".php"), - $cs->checkDisabledCode("PATH", PATH_PLUGINS . $pluginName) - ); - } - - if (!empty($arrayFoundDisabledCode)) { - $response = array(); - $response["status"] = "DISABLED-CODE"; - $response["message"] = G::LoadTranslation("ID_DISABLED_CODE_PLUGIN"); - - echo G::json_encode($response); - exit(0); - } - } - // change to ENABLED require_once($path); $details = $oPluginRegistry->getPluginDetails($pluginFile); diff --git a/workflow/engine/methods/setup/pluginsImportFile.php b/workflow/engine/methods/setup/pluginsImportFile.php index 2d0537bc8..cf5f1b228 100644 --- a/workflow/engine/methods/setup/pluginsImportFile.php +++ b/workflow/engine/methods/setup/pluginsImportFile.php @@ -33,148 +33,6 @@ try { G::uploadFile($tempName, $path, $filename); } - //save the files Enterprise - if ($_FILES['form']['error']['PLUGIN_FILENAME'] == 0) { - $filename = $_FILES['form']['name']['PLUGIN_FILENAME']; - $path = PATH_DOCUMENT . 'input' . PATH_SEP; - if (strpos($filename, 'enterprise') !== false) { - $tar = new Archive_Tar($path . $filename); - $sFileName = substr($filename, 0, strrpos($filename, '.')); - $sClassName = substr($filename, 0, strpos($filename, '-')); - $sClassName = !empty($sClassName) ? $sClassName : $sFileName; - - $files = $tar->listContent(); - $licenseName = ''; - $listFiles = array(); - foreach ($files as $key => $val) { - if (strpos(trim($val['filename']), 'enterprise/data/') !== false) { - $listFiles[] = trim($val['filename']); - } - if (strpos(trim($val['filename']), 'license_') !== false) { - $licenseName = trim($val['filename']); - } - } - $tar->extractList($listFiles, PATH_PLUGINS . 'data'); - $tar->extractList($licenseName, PATH_PLUGINS); - - $pluginRegistry = PluginRegistry::loadSingleton(); - $autoPlugins = glob(PATH_PLUGINS . "data/enterprise/data/*.tar"); - $autoPluginsA = array(); - - foreach ($autoPlugins as $filePath) { - $plName = basename($filePath); - //if (!(in_array($plName, $def))) { - if (strpos($plName, 'enterprise') === false) { - $autoPluginsA[]["sFilename"] = $plName; - } - } - - $aPlugins = $autoPluginsA; - foreach ($aPlugins as $key => $aPlugin) { - $sClassName = substr($aPlugin["sFilename"], 0, strpos($aPlugin["sFilename"], "-")); - - $oTar = new Archive_Tar(PATH_PLUGINS . "data/enterprise/data/" . $aPlugin["sFilename"]); - $oTar->extract(PATH_PLUGINS); - - if (!(class_exists($sClassName))) { - require_once(PATH_PLUGINS . $sClassName . ".php"); - } - - $pluginDetail = $pluginRegistry->getPluginDetails($sClassName . ".php"); - $pluginRegistry->installPlugin($pluginDetail->getNamespace()); //error - $pluginRegistry->savePlugin($pluginDetail->getNamespace()); - } - $licfile = glob(PATH_PLUGINS . "*.dat"); - - if ((isset($licfile[0])) && (is_file($licfile[0]))) { - $licfilename = basename($licfile[0]); - @copy($licfile[0], PATH_DATA_SITE . $licfilename); - @unlink($licfile[0]); - } - - require_once('classes/model/AddonsStore.php'); - AddonsStore::checkLicenseStore(); - $licenseManager = PmLicenseManager::getSingleton(); - AddonsStore::updateAll(false); - - $message = G::loadTranslation('ID_ENTERPRISE_INSTALLED') . ' ' . G::loadTranslation('ID_LOG_AGAIN'); - G::SendMessageText($message, "INFO"); - $licenseManager = PmLicenseManager::getSingleton(); - die(''); - } - } - - //save the packages plugins - if ($_FILES['form']['error']['PLUGIN_FILENAME'] == 0) { - $filename = $_FILES['form']['name']['PLUGIN_FILENAME']; - $path = PATH_DOCUMENT . 'input' . PATH_SEP; - if (strpos($filename, 'plugins-') !== false) { - $tar = new Archive_Tar($path . $filename); - $sFileName = substr($filename, 0, strrpos($filename, '.')); - $sClassName = substr($filename, 0, strpos($filename, '-')); - $sClassName = !empty($sClassName) ? $sClassName : $sFileName; - - $files = $tar->listContent(); - $licenseName = ''; - $listFiles = array(); - foreach ($files as $key => $val) { - if (strpos(trim($val['filename']), 'plugins/') !== false) { - $listFiles[] = trim($val['filename']); - } - if (strpos(trim($val['filename']), 'license_') !== false) { - $licenseName = trim($val['filename']); - } - } - $tar->extractList($listFiles, PATH_PLUGINS . 'data'); - $tar->extractList($licenseName, PATH_PLUGINS); - - $pluginRegistry = PluginRegistry::loadSingleton(); - $autoPlugins = glob(PATH_PLUGINS . "data/plugins/*.tar"); - $autoPluginsA = array(); - - foreach ($autoPlugins as $filePath) { - $plName = basename($filePath); - if (strpos($plName, 'enterprise') === false) { - $autoPluginsA[]["sFilename"] = $plName; - } - } - - $aPlugins = $autoPluginsA; - foreach ($aPlugins as $key => $aPlugin) { - $sClassName = substr($aPlugin["sFilename"], 0, strpos($aPlugin["sFilename"], "-")); - - $oTar = new Archive_Tar(PATH_PLUGINS . "data/plugins/" . $aPlugin["sFilename"]); - $oTar->extract(PATH_PLUGINS); - - if (!(class_exists($sClassName))) { - require_once(PATH_PLUGINS . $sClassName . ".php"); - } - - $pluginDetail = $pluginRegistry->getPluginDetails($sClassName . ".php"); - $pluginRegistry->installPlugin($pluginDetail->getNamespace()); //error - $pluginRegistry->savePlugin($pluginDetail->getNamespace()); - } - - $licfile = glob(PATH_PLUGINS . "*.dat"); - - if ((isset($licfile[0])) && (is_file($licfile[0]))) { - $licfilename = basename($licfile[0]); - @copy($licfile[0], PATH_DATA_SITE . $licfilename); - @unlink($licfile[0]); - } - - require_once('classes/model/AddonsStore.php'); - AddonsStore::checkLicenseStore(); - $licenseManager = PmLicenseManager::getSingleton(); - AddonsStore::updateAll(false); - - $message = G::loadTranslation('ID_ENTERPRISE_INSTALLED') . ' ' . G::loadTranslation('ID_LOG_AGAIN'); - G::SendMessageText($message, "INFO"); - $licenseManager = PmLicenseManager::getSingleton(); - die(''); - } - } - if (!$_FILES['form']['type']['PLUGIN_FILENAME'] == 'application/octet-stream') { $pluginFilename = $_FILES['form']['type']['PLUGIN_FILENAME']; throw new Exception(G::loadTranslation('ID_FILES_INVALID_PLUGIN_FILENAME', SYS_LANG, array("pluginFilename" => $pluginFilename @@ -203,12 +61,6 @@ try { } } - $partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false; - if (($sClassName == 'enterprise') && ($partnerFlag)) { - $pathFileFlag = PATH_DATA . 'flagNewLicence'; - file_put_contents($pathFileFlag, 'New Enterprise'); - } - $oPluginRegistry = PluginRegistry::loadSingleton(); $pluginFile = $sClassName . '.php'; @@ -228,11 +80,6 @@ try { } $res = $tar->extract($path); - //Check if is enterprise plugin - if ($oPluginRegistry->isEnterprisePlugin($sClassName, $path)) { - throw new Exception(G::LoadTranslation('ID_PMPLUGIN_IMPORT_PLUGIN_IS_ENTERPRISE', [$filename])); - } - //Check disabled code $arrayFoundDisabledCode = []; $cs = new CodeScanner(config("system.workspace")); diff --git a/workflow/engine/methods/strategicDashboard/main.php b/workflow/engine/methods/strategicDashboard/main.php index 681c313f3..aee747ef5 100644 --- a/workflow/engine/methods/strategicDashboard/main.php +++ b/workflow/engine/methods/strategicDashboard/main.php @@ -1,12 +1,5 @@ requirePermissions('PM_DASHBOARD'); -$licensedFeatures = PMLicensedFeatures::getSingleton(); - -if (!$licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) { - G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels'); - G::header('location: ../login/login'); - die; -} $G_MAIN_MENU = 'processmaker'; $G_ID_MENU_SELECTED = 'DASHBOARD+'; diff --git a/workflow/engine/skinEngine/base/updating.php b/workflow/engine/skinEngine/base/updating.php index 47031fb18..83f2d57ea 100644 --- a/workflow/engine/skinEngine/base/updating.php +++ b/workflow/engine/skinEngine/base/updating.php @@ -202,7 +202,6 @@ a.next { Privacy Statement - Security Statement - Terms of Service - - Commercial License - Contact Us - RSS diff --git a/workflow/engine/skinEngine/neoclassic/css/pmos-xtheme-gray.css b/workflow/engine/skinEngine/neoclassic/css/pmos-xtheme-gray.css index a97c089f6..e3e2bd123 100644 --- a/workflow/engine/skinEngine/neoclassic/css/pmos-xtheme-gray.css +++ b/workflow/engine/skinEngine/neoclassic/css/pmos-xtheme-gray.css @@ -1707,15 +1707,6 @@ white-space:normal; * Cases Interface styles */ - -.ICON_PMENTERPRISE { - background-image: url(/images/icon-pmlogo-15x15.png) !important; -} - -.ICON_ADDONSSTORE { - background-image: url(/images/enterprise/store-medium.png) !important; -} - .msg .x-box-mc { font-size:14px; } @@ -1736,24 +1727,6 @@ white-space:normal; background-color: #fff !important; } -.download { - background-color: #333333 !important; - /*padding-left: 17px !important;*/ - - background-image: url(/images/enterprise/loader-black.gif); - background-repeat: no-repeat; - background-position: 2px center; -} - -.install { - background-color: #333333 !important; - /*padding-left: 17px !important;*/ - - background-image: url(/images/enterprise/loader-black.gif); - background-repeat: no-repeat; - background-position: 2px center; -} - .installed { background-color: #959595 !important; diff --git a/workflow/engine/skinEngine/neoclassic/updating.php b/workflow/engine/skinEngine/neoclassic/updating.php index 06b34d1e1..b465ab4d3 100644 --- a/workflow/engine/skinEngine/neoclassic/updating.php +++ b/workflow/engine/skinEngine/neoclassic/updating.php @@ -202,7 +202,6 @@ a.next { Privacy Statement - Security Statement - Terms of Service - - Commercial License - Contact Us - RSS diff --git a/workflow/engine/skinEngine/skinEngine.php b/workflow/engine/skinEngine/skinEngine.php index 1da6a140f..b01d525c8 100644 --- a/workflow/engine/skinEngine/skinEngine.php +++ b/workflow/engine/skinEngine/skinEngine.php @@ -418,12 +418,6 @@ class SkinEngine if (strpos($_SERVER['REQUEST_URI'], '/login/login') !== false) { $freeOfChargeText = ""; - if (!defined('SKIP_FREE_OF_CHARGE_TEXT')) { - $freeOfChargeText = "Supplied free of charge with no support, certification, warranty,
maintenance nor indemnity by Processmaker and its Certified Partners."; - } - if (file_exists(PATH_CLASSES . "class.pmLicenseManager.php")) { - $freeOfChargeText = ""; - } $fileFooter = PATH_SKINS . SYS_SKIN . PATH_SEP . 'footer.html'; if (file_exists($fileFooter)) { @@ -777,12 +771,6 @@ class SkinEngine if (strpos($_SERVER['REQUEST_URI'], '/login/login') !== false) { $freeOfChargeText = ""; - if (!defined('SKIP_FREE_OF_CHARGE_TEXT')) { - $freeOfChargeText = "Supplied free of charge with no support, certification, warranty, maintenance nor indemnity by ProcessMaker and its Certified Partners."; - } - if (file_exists(PATH_CLASSES . "PmLicenseManager.php")) { - $freeOfChargeText = ""; - } $fileFooter = PATH_SKINS . SYS_SKIN . PATH_SEP . 'footer.html'; if (file_exists($fileFooter)) { @@ -865,24 +853,6 @@ class SkinEngine $smarty->assign('user', $name); } - if (!empty(config("system.workspace"))) { - $pmLicenseManagerO = PmLicenseManager::getSingleton(); - $expireIn = $pmLicenseManagerO->getExpireIn(); - $expireInLabel = $pmLicenseManagerO->getExpireInLabel(); - - if (!is_null($RBAC) && - isset($RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE']) && - $RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE'] == 'PROCESSMAKER_ADMIN' - ) { - if ($expireInLabel != '') { - $smarty->assign( - 'msgVer', - '  ' - ); - } - } - } - if (!empty(config("system.workspace"))) { $logout = "/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN . ((SYS_COLLECTION != "tracker") ? "/login/login" : "/tracker/login"); } else { diff --git a/workflow/engine/skinEngine/uxmodern/css/pmos-xtheme-gray.css b/workflow/engine/skinEngine/uxmodern/css/pmos-xtheme-gray.css index b2bb36066..5b5575627 100644 --- a/workflow/engine/skinEngine/uxmodern/css/pmos-xtheme-gray.css +++ b/workflow/engine/skinEngine/uxmodern/css/pmos-xtheme-gray.css @@ -1615,27 +1615,6 @@ td.x-cnotes-label { padding-left: 3px; padding-right: 3px; } - -.x-pm-license-notification { - background-color: #EFEFEF; - border: 1px solid #B2B2B2; - border-radius: 5px; - color:#848484; - font-family: Tahoma, sans-serif, MiscFixed; - font-size: 10px; - font-weight:bold; - height:20px; - line-height:20px; - text-decoration:none; - padding: 6px 15px; -} - -.x-pm-license-notification a { - color:#848484; -text-decoration: none; -} - - .cancelSummary { color: #333; background: #fff; diff --git a/workflow/engine/skinEngine/uxmodern/layout-pm-modern.html b/workflow/engine/skinEngine/uxmodern/layout-pm-modern.html index 8b7618af7..ea7533f63 100644 --- a/workflow/engine/skinEngine/uxmodern/layout-pm-modern.html +++ b/workflow/engine/skinEngine/uxmodern/layout-pm-modern.html @@ -29,11 +29,6 @@
- {if $licenseNotification != ''} - - {$licenseNotification} - - {/if} diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/ActionsByEmail.php b/workflow/engine/src/ProcessMaker/BusinessModel/ActionsByEmail.php index 0f110a7a6..db83c172a 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/ActionsByEmail.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/ActionsByEmail.php @@ -17,7 +17,6 @@ use EmailServerPeer; use Exception; use G; use PmDynaform; -use PMLicensedFeatures; use ProcessMaker\Core\System; use ProcessMaker\Model\AbeConfiguration as AbeConfigurationModel; use ProcessMaker\Model\EmailServerModel; @@ -39,9 +38,6 @@ class ActionsByEmail public function saveConfiguration($params) { - if (PMLicensedFeatures - ::getSingleton() - ->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) { $feature = $params['ActionsByEmail']; switch ($feature['type']) { case 'configuration': @@ -65,18 +61,14 @@ class ActionsByEmail default: break; } - } } public function loadConfiguration($params) { - if ($params['type'] != 'activity' - || !PMLicensedFeatures - ::getSingleton() - ->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) - { + if ($params['type'] != 'activity') { return false; } + require_once 'classes/model/AbeConfiguration.php'; $criteria = new Criteria(); diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/ActionsByEmail/ResponseReader.php b/workflow/engine/src/ProcessMaker/BusinessModel/ActionsByEmail/ResponseReader.php index 2912bba68..09df0123d 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/ActionsByEmail/ResponseReader.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/ActionsByEmail/ResponseReader.php @@ -17,7 +17,6 @@ use Illuminate\Support\Facades\Crypt; use Illuminate\Support\Facades\Log; use PhpImap\IncomingMail; use PhpImap\Mailbox; -use PMLicensedFeatures; use ProcessMaker\BusinessModel\ActionsByEmail; use ProcessMaker\BusinessModel\EmailServer; use ProcessMaker\ChangeLog\ChangeLog; @@ -60,9 +59,6 @@ class ResponseReader G::outRes(G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", ['php_imap']) . "\n"); return; } - if (PMLicensedFeatures - ::getSingleton() - ->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) { $criteriaAbe = new Criteria(); $criteriaAbe->add(AbeConfigurationPeer::ABE_TYPE, "RESPONSE"); $resultAbe = AbeConfigurationPeer::doSelectRS($criteriaAbe); @@ -71,7 +67,6 @@ class ResponseReader $dataAbe = $resultAbe->getRow(); $this->getAllEmails($dataAbe); } - } } catch (Exception $e) { $message = $e->getMessage(); $context = $this->case; diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Light.php b/workflow/engine/src/ProcessMaker/BusinessModel/Light.php index 331d860c3..49f059900 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Light.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Light.php @@ -19,7 +19,6 @@ use G; use GulliverBasePeer; use Illuminate\Support\Facades\Log; use InputDocument; -use PmLicenseManager; use PMmemcached; use Process; use ProcessMaker\BusinessModel\Cases as BusinessModelCases; diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Lists.php b/workflow/engine/src/ProcessMaker/BusinessModel/Lists.php index 9231ecd33..34f0aa3de 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Lists.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Lists.php @@ -4,7 +4,6 @@ namespace ProcessMaker\BusinessModel; use G; use Criteria; -use PMLicensedFeatures; use ProcessMaker\Model\Delegation; use ProcessMaker\Model\User; use UsersPeer; @@ -303,11 +302,8 @@ class Lists ])); break; case 'ListConsolidated': - $licensedFeatures = PMLicensedFeatures::getSingleton(); - if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) { - $total = $this->$listObject->getCountList($userId); - array_push($response, (array('count' => $total, 'item' => $item))); - } + $total = $this->$listObject->getCountList($userId); + array_push($response, (array('count' => $total, 'item' => $item))); break; default: $totalInbox = $this->$listObject->getCountList($userId); diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Migrator/GranularExporter.php b/workflow/engine/src/ProcessMaker/BusinessModel/Migrator/GranularExporter.php index 846b02e41..fa27ea62e 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Migrator/GranularExporter.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Migrator/GranularExporter.php @@ -35,9 +35,6 @@ class GranularExporter public function export($objectList) { try { - if (\PMLicensedFeatures::getSingleton()->verifyfeature - ("jXsSi94bkRUcVZyRStNVExlTXhEclVadGRRcG9xbjNvTWVFQUF3cklKQVBiVT0=") - ) { $exportObject = new ExportObjects(); $objectList = $exportObject->mapObjectList($objectList); $this->beforeExport($objectList); @@ -49,11 +46,6 @@ class GranularExporter $migrator->afterExport(); } return $this->publish(); - } else { - $exception = new ExportException(); - $exception->setNameException(\G::LoadTranslation('ID_NO_LICENSE_SELECTIVEIMPORTEXPORT_ENABLED')); - throw($exception); - } } catch (\Exception $e) { throw $e; } diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Migrator/GranularImporter.php b/workflow/engine/src/ProcessMaker/BusinessModel/Migrator/GranularImporter.php index dd4824114..edafa9083 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Migrator/GranularImporter.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Migrator/GranularImporter.php @@ -186,9 +186,6 @@ class GranularImporter public function import($objectList) { try { - if (\PMLicensedFeatures::getSingleton()->verifyfeature - ("jXsSi94bkRUcVZyRStNVExlTXhEclVadGRRcG9xbjNvTWVFQUF3cklKQVBiVT0=") - ) { $objectList = $this->reorderImportOrder($objectList); foreach ($objectList as $data) { $objClass = $this->factory->create($data['name']); @@ -200,11 +197,6 @@ class GranularImporter $objClass->afterImport($dataImport); } } - } else { - $exception = new ImportException(); - $exception->setNameException(\G::LoadTranslation('ID_NO_LICENSE_SELECTIVEIMPORTEXPORT_ENABLED')); - throw($exception); - } } catch (\Exception $e) { if (get_class($e) === 'ProcessMaker\BusinessModel\Migrator\ImportException') { diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Pmgmail.php b/workflow/engine/src/ProcessMaker/BusinessModel/Pmgmail.php index bfa7efbca..f9a59678b 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Pmgmail.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Pmgmail.php @@ -206,14 +206,7 @@ class Pmgmail { */ public function hasGmailFeature() { - require_once (PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.licensedFeatures.php"); - - $licensedFeatures = new \PMLicensedFeatures(); - if (!$licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) { - return false; - }else { - return true; - } + return true; } /** diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Trigger.php b/workflow/engine/src/ProcessMaker/BusinessModel/Trigger.php index 0903fb714..27f3fcc35 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Trigger.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Trigger.php @@ -4,7 +4,6 @@ namespace ProcessMaker\BusinessModel; use CodeScanner; use Exception; use G; -use PMLicensedFeatures; use Triggers as ModelTriggers; class Trigger diff --git a/workflow/engine/src/ProcessMaker/Cases/CasesTrait.php b/workflow/engine/src/ProcessMaker/Cases/CasesTrait.php index cbc4242c7..fffc5f4e0 100644 --- a/workflow/engine/src/ProcessMaker/Cases/CasesTrait.php +++ b/workflow/engine/src/ProcessMaker/Cases/CasesTrait.php @@ -13,7 +13,6 @@ use Event; use Exception; use G; use Illuminate\Support\Facades\Log; -use PMLicensedFeatures; use ProcessMaker\BusinessModel\Cases\InputDocument; use ProcessMaker\BusinessModel\Pmgmail; use ProcessMaker\ChangeLog\ChangeLog; diff --git a/workflow/engine/src/ProcessMaker/Core/Installer.php b/workflow/engine/src/ProcessMaker/Core/Installer.php index 90e5041aa..a1485a8b7 100644 --- a/workflow/engine/src/ProcessMaker/Core/Installer.php +++ b/workflow/engine/src/ProcessMaker/Core/Installer.php @@ -376,7 +376,6 @@ class Installer } } - //ACTIVE ENTERPRISE ini_set('max_execution_time', '0'); $serv = 'http://'; diff --git a/workflow/engine/src/ProcessMaker/Model/LicenseManager.php b/workflow/engine/src/ProcessMaker/Model/LicenseManager.php deleted file mode 100644 index b9c9a817e..000000000 --- a/workflow/engine/src/ProcessMaker/Model/LicenseManager.php +++ /dev/null @@ -1,17 +0,0 @@ -_aPluginDetails as $pluginDetail) { @@ -159,8 +157,7 @@ class PluginRegistry if (!empty($pluginDetail->getFile()) && file_exists($pluginDetail->getFile())) { $arrayFileInfo = pathinfo($pluginDetail->getFile()); $Filename = ( - ($pluginDetail->getNamespace() == "enterprise") ? - PATH_CORE . "methods" . PATH_SEP . "enterprise" . PATH_SEP : + ( PATH_PLUGINS ) . $arrayFileInfo["basename"]; if (!file_exists($Filename)) { @@ -169,7 +166,6 @@ class PluginRegistry require_once $Filename; $className = $pluginDetail->getClassName(); if (class_exists($className)) { - /** @var enterprisePlugin|\PMPlugin $Plugin */ $Plugin = new $className($pluginDetail->getNamespace(), $pluginDetail->getFile()); $this->_aPlugins[$pluginDetail->getNamespace()] = $Plugin; $iPlugins++; @@ -237,7 +233,6 @@ class PluginRegistry $currentPlugin->setEnabled(true); //PluginsRegistry::enable($Namespace); $className = $currentPlugin->getClassName(); - /** @var enterprisePlugin $Plugin */ if (class_exists($className)) { $plugin = new $className( $currentPlugin->getNamespace(), @@ -481,7 +476,6 @@ class PluginRegistry /** @var PluginDetail $detail */ $detail = $this->_aPluginDetails[$Namespace]; $className = $detail->getClassName(); - /** @var enterprisePlugin $oPlugin */ $oPlugin = new $className($detail->getNamespace(), $detail->getFile()); $oPlugin->registerPmFunction(); $detail->setEnabled(false); @@ -852,9 +846,7 @@ class PluginRegistry $classFile = ''; /** @var FolderDetail $folder */ foreach ($this->_aFolders as $folder) { - $fname = $folder->equalNamespaceTo('enterprise') ? - PATH_CORE . 'classes' . PATH_SEP . 'class.' . $folder->getFolderName() . '.php' : - PATH_PLUGINS . $folder->getFolderName() . PATH_SEP . 'class.' . $folder->getFolderName() . '.php'; + $fname = PATH_PLUGINS . $folder->getFolderName() . PATH_SEP . 'class.' . $folder->getFolderName() . '.php'; if ($trigger->equalNamespaceTo($folder->getNamespace()) && file_exists($fname)) { $found = true; $classFile = $fname; @@ -895,9 +887,7 @@ class PluginRegistry /** @var FolderDetail $folder */ foreach ($this->_aFolders as $folder) { $folderName = $folder->getFolderName(); - $fileName = $folder->getNamespace() == 'enterprise' ? - PATH_CORE . 'classes' . PATH_SEP . 'class.' . $folderName . '.php' : - PATH_PLUGINS . $folderName . PATH_SEP . 'class.' . $folderName . '.php'; + $fileName = PATH_PLUGINS . $folderName . PATH_SEP . 'class.' . $folderName . '.php'; if ($trigger->getNamespace() == $folder->getNamespace() && file_exists($fileName)) { $found = true; } @@ -1603,26 +1593,6 @@ class PluginRegistry 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 string $pluginName diff --git a/workflow/engine/src/ProcessMaker/Services/Api/System.php b/workflow/engine/src/ProcessMaker/Services/Api/System.php index 89a90b15d..2d244e8ff 100644 --- a/workflow/engine/src/ProcessMaker/Services/Api/System.php +++ b/workflow/engine/src/ProcessMaker/Services/Api/System.php @@ -4,7 +4,6 @@ namespace ProcessMaker\Services\Api; use Exception; use Luracast\Restler\RestException; -use PMLicensedFeatures; use ProcessMaker\BusinessModel\Cases\CasesList; use ProcessMaker\BusinessModel\DataBaseConnection; use ProcessMaker\BusinessModel\Language; diff --git a/workflow/engine/src/ProcessMaker/Services/Google/Authentication.php b/workflow/engine/src/ProcessMaker/Services/Google/Authentication.php index eb28d85c6..24da74858 100644 --- a/workflow/engine/src/ProcessMaker/Services/Google/Authentication.php +++ b/workflow/engine/src/ProcessMaker/Services/Google/Authentication.php @@ -11,7 +11,7 @@ class Authentication */ public function postTokenAccountGmail($request_data) { - $responseToken = array('msg' => \G::LoadTranslation( 'ID_UPGRADE_ENTERPRISE' )); + $responseToken = array('msg' => 'Upgrade'); //Lets verify the gmail token $url = 'https://www.googleapis.com/oauth2/v1/tokeninfo?access_token='.$request_data['token']; diff --git a/workflow/engine/src/ProcessMaker/Services/api.ini b/workflow/engine/src/ProcessMaker/Services/api.ini index cc6694805..69565cff2 100644 --- a/workflow/engine/src/ProcessMaker/Services/api.ini +++ b/workflow/engine/src/ProcessMaker/Services/api.ini @@ -6,7 +6,7 @@ debug = 1 [api] version = 1.0 - vendor = "ProcessMaker - Michelangelo (Enterprise)" + vendor = "ProcessMaker - Michelangelo" [alias: test] test2 = "ProcessMaker\Services\Api\Test2" diff --git a/workflow/engine/templates/cases/casesListSetup.js b/workflow/engine/templates/cases/casesListSetup.js index d5f3251f4..3464a7334 100644 --- a/workflow/engine/templates/cases/casesListSetup.js +++ b/workflow/engine/templates/cases/casesListSetup.js @@ -203,7 +203,6 @@ Ext.onReady(function () { } }); - // COMPONENT DEPRECATED remove it in the next revision of the enterprise plugin // create the Dropdown for rows per page var pmRowsPerPage = new Ext.form.ComboBox ({ width : 60, @@ -220,7 +219,6 @@ Ext.onReady(function () { triggerAction : 'all' }); - // COMPONENT DEPRECATED remove it in the next revision of the enterprise plugin // create the Dropdown for date formats var pmDateFormat = new Ext.form.ComboBox ({ width : 80, diff --git a/workflow/engine/templates/enterprise/addonsStore.js b/workflow/engine/templates/enterprise/addonsStore.js deleted file mode 100644 index 810e57d1e..000000000 --- a/workflow/engine/templates/enterprise/addonsStore.js +++ /dev/null @@ -1,1551 +0,0 @@ -Ext.Ajax.timeout = 1800000; - -Ext.onReady(function() { - onMessageMnuContext = function (grid, rowIndex, e) { - e.stopEvent(); - var coords = e.getXY(); - mnuContext.showAt([coords[0], coords[1]]); - }; - - /////// - var storePM; - - var msgCt; - - //Stores - storePM = new Ext.data.Store({ - proxy: new Ext.data.HttpProxy({ - url: "processMakerAjax", - method: "POST" - }), - - baseParams: {"option": "list"}, - - reader: new Ext.data.JsonReader({ - root: "results", - fields: [{name: "OBJ_UID", type: "string"}, {name: "OBJ_VERSION", type: "string"}, {name: "OBJ_VERSION_NAME", type: "string"}] - }), - - autoLoad: true, //First call - - listeners: { - exception: function (proxy, type, action, options, response, args){ - var dataResponse; - var sw = 1; - - if (sw == 1 && !response.responseText) { - sw = 0; - } - if (sw == 1 && response.responseText && response.responseText != "") { - dataResponse = eval("(" + response.responseText + ")"); //json - - if (dataResponse.status && dataResponse.status == "ERROR") { - sw = 0; - } - } - - }, - load: function (store, record, option) { - // - } - } - }); - - function createBox(t, s){ - return ['
', - '
', - '

', t, '

', s, '
', - '
', - '
'].join(''); - } - - function message(title, arguments){ - if (!msgCt) { - msgCt = Ext.DomHelper.insertFirst(document.body, { - id:'msg-div' - }, true); - } - msgCt.alignTo(document, 't-t'); - var m = Ext.DomHelper.append(msgCt, { - html:createBox(title, arguments) - }, true); - m.slideIn('t').pause(10).ghost("t", { - remove:true - }); - } - - Ext.QuickTips.init(); - Ext.form.Field.prototype.msgTarget = 'side'; - - var upgradeAddonId; - var upgradeStoreId; - - function newLocation() { - var site = ''; - if (SYS_SKIN.substring(0,2) == 'ux') { - site = PROCESSMAKER_URL + "/main?st=admin&s=PMENTERPRISE"; - } else { - site = PROCESSMAKER_URL + "/setup/main?s=PMENTERPRISE"; - } - return site; - } - - function upgradeStatus(addonId, storeId, record) { - upgradeAddonId = addonId; - upgradeStoreId = storeId; - progressWindow.show(); - if (record) { - progress = record.get('progress'); - status = record.get('status'); - if (status == 'install') { - msg = _('ID_WAIT_INSTALLING_PLUGIN'); - } else if (status == 'install-finish') { - msg = _('ID_UPGRADE_FINISHED'); - } else { - msg = _('ID_UPGRADING_PLUGIN'); - } - if (status == "download" && progress) { - msg = _('ID_DOWNLOADING_UPGRADE') + " " + progress + "%"; - Ext.ComponentMgr.get('upgrade-progress').show(); - Ext.ComponentMgr.get('upgrade-progress').updateProgress(progress/100, '', true); - } else { - Ext.ComponentMgr.get('upgrade-progress').hide(); - } - Ext.ComponentMgr.get('finish-upgrade-button').setDisabled((status != "install-finish")); - msg = '

' + msg + '

'; - logMsg = record.get('log'); - while (logMsg && logMsg.indexOf("\n") > -1) { - logMsg = logMsg.replace("\n","
"); - } - if (logMsg && status != "download-start") { - Ext.ComponentMgr.get('upgrade-log').update("

" + _('ID_INSTALLATION_LOG') + "

"+logMsg+"

"); - } - } else { - msg = "

" + _('ID_UPGRADE_STARTING') + "

"; - } - Ext.ComponentMgr.get('upgrade-status').update(msg); - } - - function installError(addonId, storeId, msg) { - recordId = addonsStore.findBy(function(record) { - return (record.get("id") == addonId && record.get("store") == storeId); - }); - - downloadLink = ""; - if (recordId != -1) { - record = addonsStore.getAt(recordId); - url = record.get("url"); - downloadLink = "

" + _('ID_DOWNLOAD_MANUALLY') + "

"; - } - - if (msg === undefined) { - msg = "

"+_('ID_ERROR')+":" + _('ID_UNKNOWN') + "

"; - } else { - msg = "

"+_('ID_ERROR')+": " + msg + "

"; - } - - errorWindow = new Ext.Window({ - //applyTo: document.body, - layout: "fit", - width: 400, - height: 250, - plain: true, - modal: true, - - items: [{ - id: "error", - preventBodyReset: true, - padding: 15, - html: "

" + _('ID_INSTALL_ERROR') + "

" + - "

" + _('ID_ERROR_INSTALLING_ADDON') + "

" + - //downloadLink + - msg - }], - - buttons: [{ - text: _('ID_CLOSE'), - handler: function(){ - errorWindow.hide(); - } - }] - }); - errorWindow.show(this); - } - - function storeError(msg) { - if (msg === undefined) { - msg = "

"+_('ID_ERROR')+": " + _('ID_UNKNOWN') + "

"; - } else { - msg = "

"+_('ID_ERROR')+": " + msg + "

"; - } - - errorWindow = new Ext.Window({ - //applyTo:document.body, - layout:'fit', - width:400, - height:250, - plain: true, - modal: true, - - items: [{ - id: 'error', - preventBodyReset : true, - padding: 15, - html: '

' + _('ID_SERVER_ERROR') + '

'+ - '

' + _('ID_MARKET_SERVER_CONTACTING') + '

'+ - msg - }], - - buttons: [{ - text: _('ID_CLOSE'), - handler: function(){ - errorWindow.hide(); - } - }] - }); - errorWindow.show(this); - } - - function installAddon(addonId, storeId) - { var sw = 1; - var msg = ""; - - if (sw == 1 && PATH_PLUGINS_WRITABLE == 0) { - sw = 0; - msg = PATH_PLUGINS_WRITABLE_MESSAGE; - } - - if (sw == 1) { - swReloadTask = 0; - reloadTask.cancel(); - - recordId = addonsStore.findBy(function(record) { - return (record.get("id") == addonId && record.get("store") == storeId); - }); - - if (recordId != -1) { - record = addonsStore.getAt(recordId); - record.set("status", "download-start"); - record.commit(); - - //addonEnabled = record.get("enabled"); - } - - Ext.Ajax.request({ - url: "addonsStoreAction", - method: "POST", - params: { - "action": "install", - "addon": addonId, - "store": storeId - }, - - success: function (response, opts) { - var dataResponse = eval("(" + response.responseText + ")"); //json - swReloadTask = 1; - - if (dataResponse.status && dataResponse.status == "OK") { - //parent.Ext.getCmp(parent.tabItems[1].id).getRootNode().reload(); - parent.parent.window.location.href = newLocation(); - } else { - installError(addonId, storeId, dataResponse.message); - - addonsStore.load(); - } - }, - - failure: function (response, opts) { - swReloadTask = 1; - - //installError(addonId, storeId); - } - }); - } else { - Ext.MessageBox.alert(_('ID_WARNING'), msg); - } - } - - function addonAvailable(addonId) - { - if (INTERNET_CONNECTION == 1) { - swReloadTask = 0; - reloadTask.cancel(); - - Ext.MessageBox.confirm( - _('ID_CONFIRM'), - _('ID_SALES_DEPARTMENT_REQUEST'), - function (btn, text) { - if (btn == "yes") { - var myMask = new Ext.LoadMask(Ext.getBody(), {msg: _('ID_SENDING_REQUEST_SALES_DEPARTMENT')}); - myMask.show(); - - Ext.Ajax.request({ - url: "addonsStoreAction", - method: "POST", - params: { - "action": "available", - "addonId": addonId - }, - - success: function (response, opts) { - var dataResponse = eval("(" + response.responseText + ")"); //json - - swReloadTask = 1; - myMask.hide(); - - if (dataResponse.status && dataResponse.status == "OK") { - Ext.MessageBox.show({ - width: 400, - icon: Ext.MessageBox.INFO, - buttons: Ext.MessageBox.OK, - - title: _('ID_INFORMATION'), - msg: _('ID_REQUEST_SENT') - //fn: saveAddress - }); - } else { - Ext.MessageBox.alert(_('ID_WARNING'), dataResponse.message); - } - - addonsStore.load(); - }, - - failure: function (response, opts) { - swReloadTask = 1; - myMask.hide(); - } - }); - } else { - swReloadTask = 1; - - addonsStore.load(); - } - } - ); - } else { - Ext.MessageBox.alert(_('ID_INFORMATION'), _('ID_NO_INTERNET_CONECTION')); - } - } - - function processMakerInstall() - { - var myMask = new Ext.LoadMask(Ext.getBody(), {msg: _('ID_WAIT_WHILE_UPGRADING_PROCESSMAKER')}); - myMask.show(); - - - var record = cboPm.findRecord(cboPm.valueField, cboPm.getValue()); - var index = cboPm.store.indexOf(record); - - var uid = cboPm.store.getAt(index).get("OBJ_UID"); - var version = cboPm.getValue(); - var versionName = cboPm.store.getAt(index).get(cboPm.displayField); - - swReloadTask = 0; - reloadTask.cancel(); - - Ext.Ajax.request({ - url: "processMakerAjax", - method: "POST", - params: { - "option": "install", - "uid": uid, - "version": version, - "versionName": versionName, - "processMakerVersion": PROCESSMAKER_VERSION - }, - - success: function (response, opts) { - swReloadTask = 1; - myMask.hide(); - - var sw = 1; - var msg = ""; - - if (sw == 1 && response.responseText == "") { - sw = 0; - msg = ""; - } - - if (sw == 1 && !(/^.*\{.*\}.*$/.test(response.responseText))) { - sw = 0; - msg = "
" + response.responseText + "
"; - } - - if (sw == 1) { - var dataResponse = eval("(" + response.responseText + ")"); //json - - if (dataResponse.status && dataResponse.status == "OK") { - //window.location.href = ""; - //window.location.reload(); - Ext.MessageBox.alert(_('ID_INFORMATION'), dataResponse.message + "
" + _('ID_LOG_AGAIN'), function () { parent.parent.window.location.href = PROCESSMAKER_URL + (SYS_SKIN.substring(0,2) == 'ux')? "/main/login" :"/setup/login/login"; }); - } else { - Ext.MessageBox.alert(_('ID_WARNING'), _('ID_ERROR_UPGRADING_SYSTEM') + "
" + dataResponse.message); - addonsStore.load(); - } - } else { - Ext.MessageBox.alert(_('ID_WARNING'), _('ID_ERROR_CHECK_FOR_UPDATE_DONE') + "
" + msg, function () { parent.parent.window.location.href = PROCESSMAKER_URL + (SYS_SKIN.substring(0,2) == 'ux')? "/main/login" :"/setup/login/login"; }); - } - }, - - failure: function (response, opts) { - swReloadTask = 1; - myMask.hide(); - } - }); - } - - var enterpriseFileSupport = function () { - var myMask = new Ext.LoadMask(Ext.getBody(), {msg: _('ID_PROCESSING')}); - myMask.show(); - window.location = '../adminProxy/generateInfoSupport', - myMask.hide(); - }; - - function enterpriseProcessAjax(option) - { - switch (option) { - case "SETUP": - var myMask = new Ext.LoadMask(Ext.getBody(), {msg: _('ID_PROCESSING')}); - myMask.show(); - break; - } - - var p = { - "option": option - }; - - switch (option) { - case "SETUP": - eval("p.internetConnection = \"" + ((Ext.getCmp("chkEeInternetConnection").checked == true)? 1 : 0) + "\""); - break; - } - - Ext.Ajax.request({ - url: "enterpriseAjax", - method: "POST", - params: p, - - success: function (response, opts) { - var dataResponse = eval("(" + response.responseText + ")"); //json - - switch (option) { - case "SETUP": - INTERNET_CONNECTION = (Ext.getCmp("chkEeInternetConnection").checked == true)? 1 : 0; - - reloadTask.cancel(); - - addonsStore.load({ - params: { - "force": true - } - }); - addonsFeaturesStore.load({ - params: { - "force": true - } - }); - - Ext.getCmp("refresh-btn").setDisabled(!Ext.getCmp("chkEeInternetConnection").checked); - - myMask.hide(); - break; - } - }, - - failure: function (response, opts) { - // - } - }); - } - - var addonsStore = new Ext.data.JsonStore({ - proxy: new Ext.data.HttpProxy({ - url: "addonsStoreAction", - method: "POST" - }), - baseParams: { - "action": "addonsList", - "force" : true - }, - - autoDestroy: true, - messageProperty: 'error', - storeId: 'addonsStore', - root: 'addons', - idProperty: 'id', - sortInfo: { - field: 'nick', - direction: 'ASC' // or 'DESC' (case sensitive for local sorting) - }, - fields: ['id', 'name', 'store', 'nick', 'latest_version', 'version', 'status', - 'type', 'release_type', 'url', 'enabled', 'publisher', 'description', - 'log', 'progress'], - listeners: { - 'beforeload': function(store, options) { - Ext.ComponentMgr.get('loading-indicator').setValue(''); - return true; - }, - "exception": function(e, type, action, options, response, arg) { - - Ext.ComponentMgr.get('loading-indicator').setValue(' '); - }, - "load": function(store, records, options) { - - Ext.ComponentMgr.get('loading-indicator').setValue(""); - progressWindow.hide(); - store.filterBy(function (record, id) { - if (record.get('type') == 'core') { - coreRecord = record.copy(); - status = record.get('status'); - if (status == "download-start" || status == "download" || status == "install" || status == "install-finish") { - upgradeStatus(record.get('id'), record.get('store'), record); - } - return false; - } - - if (record.get('status') == 'download-start' || record.get('status') == 'download' || record.get('status') == 'cancel' || record.get('status') == 'install') { - // - } - return true; - }); - - if (addonsGrid.disabled) { - addonsGrid.enable(); - } - - errors = store.reader.jsonData.errors; - for (var i = 0, n = errors.length; i"; - } - - if (store_errors.length > 0) { - Ext.ComponentMgr.get('loading-indicator').setValue(' '); - reloadTask.cancel(); - } else { - Ext.ComponentMgr.get('loading-indicator').setValue(' '); - } - } - } - }); - - - var addonsFeaturesStore = new Ext.data.JsonStore({ - proxy: new Ext.data.HttpProxy({ - url: "addonsStoreAction", - method: "POST" - }), - baseParams: { - "action": "addonsList", - "type" : "features" - }, - autoDestroy: true, - messageProperty: 'error', - storeId: 'addonsFeaturesStore', - root: 'addons', - idProperty: 'id', - sortInfo: { - field: 'nick', - direction: 'ASC' // or 'DESC' (case sensitive for local sorting) - }, - fields: ['id', 'name', 'store', 'nick', 'latest_version', 'version', 'status', - 'type', 'release_type', 'url', 'enabled', 'publisher', 'description', - 'log', 'progress'], - listeners: { - 'beforeload': function(store, options) { - Ext.ComponentMgr.get('loading-features-indicator').setValue(''); - return true; - }, - "exception": function(e, type, action, options, response, arg) { - Ext.ComponentMgr.get('loading-features-indicator').setValue(' '); - }, - "load": function(store, records, options) { - Ext.ComponentMgr.get('loading-features-indicator').setValue(""); - progressWindow.hide(); - store.filterBy(function (record, id) { - if (record.get('type') == 'core') { - coreRecord = record.copy(); - status = record.get('status'); - if (status == "download-start" || status == "download" || status == "install" || status == "install-finish") { - upgradeStatus(record.get('id'), record.get('store'), record); - } - return false; - } - return true; - }); - - if (addonsFeatureGrid.disabled) { - addonsFeatureGrid.enable(); - } - - errors = store.reader.jsonData.errors; - for (var i = 0, n = errors.length; i"; - } - - if (store_errors.length > 0) { - Ext.ComponentMgr.get('loading-features-indicator').setValue(' '); - reloadTask.cancel(); - } else { - Ext.ComponentMgr.get('loading-features-indicator').setValue(' '); - } - } - } - }); - - var upgradeStore = new Ext.data.Store({ - recordType: addonsStore.recordType - }); - - var swReloadTask = 1; - - var reloadTask = new Ext.util.DelayedTask( - function () - { - if (swReloadTask == 1) { - //addonsStore.load(); - } - } - ); - - - /********** UI Controls **********/ - - var progressWindow = new Ext.Window({ - closable:false, - autoHeight: false, - autoScroll: false, - modal: true, - width:600, - height:350, - id: 'upgrade_window', - title: _('ID_UPGRADE_LABEL'), - bodyStyle: "font: normal 13px sans;", - layout: 'vbox', - layoutConfig: { - align: 'stretch' - }, - bbar: new Ext.Toolbar({ - buttonAlign: 'center', - padding: 15, - disabled: true, - items: [{ - id: 'finish-upgrade-button', - text: ' ' + "Finish" + ' ', - handler: function() { - Ext.ComponentMgr.get('finish-upgrade-button').setDisabled(true); - Ext.Ajax.request({ - url: 'addonsStoreAction', - params: { - 'action':'finish', - 'addon': upgradeAddonId, - 'store': upgradeStoreId - } - }); - } - }] - }), - items: [{ - flex: 0, - id: 'upgrade-status', - preventBodyReset : true, - padding: 5, - html: '

' + _('ID_UPGRADE_LABEL') + '

' - },{ - flex: 0, - xtype: 'progress', - hidden: true, - id: 'upgrade-progress' - },{ - flex: 1, - id: 'upgrade-log', - preventBodyReset : true, - padding: 15, - html: '', - autoScroll: true - } - ] - }); - - var addLicenseWindow = new Ext.Window({ - title: _('ID_UPDATE_LICENSE'), - closeAction: 'hide', - id: 'upload-window', - resizeable: false, - modal: true, - //frame: true, - width: 500, - //autoHeight: true, - items: [{ - xtype: 'form', - id: 'upload-form', - fileUpload: true, - frame: true, - border: false, - //bodyStyle: 'padding: 10px 10px 0 10px;', - labelWidth: 100, - defaults: { - anchor: '90%' - }, - items: [{ - xtype: "fileuploadfield", - id: "upLicense", - emptyText: _('ID_SELECT_LICENSE_FILE'), - fieldLabel: _('ID_LICENSE_FILE'), - width: 200, - name: "upLicense" - }], - buttons: [{ - text: _('ID_UPLOAD'), - handler: function (button, event) { - var uploadForm = Ext.getCmp("upload-form"); - var sw = 1; - - var fileName = Ext.getCmp("upLicense").value; - - if (!uploadForm.getForm().isValid()) { - sw = 0; - } - if (!fileName) { - sw = 0; - Ext.MessageBox.alert(_('ID_WARNING'), _('ID_WARNING_ENTERPRISE_LICENSE_MSG')); - } - - if (fileName && !(/^.*\.dat$/.test(fileName))) { - sw = 0; - Ext.MessageBox.alert(_('ID_WARNING'), _('ID_WARNING_ENTERPRISE_LICENSE_MSG_DAT')); - } - - if (sw == 1) { - uploadForm.getForm().submit({ - url: "../enterprise/addonsStoreAction", - params: { - action: "importLicense" - }, - method: 'POST', - waitTitle: _('ID_PLEASE_WAIT'), - waitMsg: _('ID_UPDATING_LICENSE_MSG'), - success: function (form, o) { - Ext.MessageBox.alert(_('ID_INFORMATION'), _('ID_SUCCESSFULLY_UPLOADED') + ' ' + _('ID_ENTERPRISE_INSTALLED'), function () { - parent.parent.window.location.href = newLocation(); - }); - }, - failure: function (form, action) { - if (action.failureType == 'server') { - parent.parent.window.location.href = newLocation(); - return; - } - var dataResponse = eval("(" + action.response.responseText.trim() + ")"); //json - Ext.MessageBox.alert(_('ID_WARNING'), (dataResponse.errors)? dataResponse.errors : _('ID_WARNING_ERROR_UPDATING')); - } - }); - } - } - }, - { - text: _('ID_CANCEL'), - handler: function() { - Ext.getCmp("upload-window").hide(); - } - } - ] - }] - }); - - var addPluginWindow = new Ext.Window({ - title: _('ID_UPLOAD_PLUGIN'), - closeAction: 'hide', - id: 'upload-plugin-window', - closeAction: 'hide', - resizable: false, - modal: true, - frame: true, - width: 400, - autoHeight: true, - items: [{ - xtype: 'form', - id: 'upload-plugin-form', - fileUpload: true, - frame: true, - border: false, - bodyStyle: 'padding: 10px 10px 0 10px;', - labelWidth: 60, - defaults: { - anchor: '100%' - }, - items: [{ - xtype: "fileuploadfield", - id: "PLUGIN_FILENAME", - - emptyText: _('ID_SELECT_PLUGIN_FILE'), - fieldLabel: _('ID_PLUGIN_FILE'), - name: "form[PLUGIN_FILENAME]" - }], - buttons: [{ - text: _('ID_UPLOAD'), - handler: function (button, event) { - var uploadForm = Ext.getCmp("upload-plugin-form"); - var sw = 1; - var msg = ""; - - if (sw == 1 && !uploadForm.getForm().isValid()) { - sw = 0; - msg = ""; - } - if (sw == 1 && !Ext.getCmp("PLUGIN_FILENAME").value) { - sw = 0; - msg = _('ID_SELECT_PLUGIN'); - } - if (Ext.getCmp("PLUGIN_FILENAME").value.indexOf('enterprise-') > -1) { - sw = 0; - msg = _('ID_ENTERPRISE_PACK_CANT_UPLOAD'); - } - - if (sw == 1) { - swReloadTask = 0; - reloadTask.cancel(); - - uploadForm.getForm().submit({ - url: "pluginsImportFile", - params: { - action: "installPlugin" - }, - waitMsg: _('ID_INSTALLING_PLUGIN'), - - success: function (form, action) { - var dataResponse = action.result; //json - - swReloadTask = 1; - Ext.getCmp("upload-plugin-window").hide(); - - parent.parent.window.location.href = newLocation(); - }, - - failure: function (form, action) { - var dataResponse = action.result; //json - - swReloadTask = 1; - - Ext.MessageBox.alert(_('ID_WARNING'), (dataResponse.message)? dataResponse.message : _('ID_ERROR_UPLOADING_PLUGIN')); - - addonsStore.load(); - } - }); - } else { - Ext.MessageBox.alert(_('ID_WARNING'), msg); - } - } - }, - { - text: _('ID_CANCEL'), - handler: function() { - Ext.getCmp("upload-plugin-window").hide(); - } - }] - }] - }); - - var pnlSetup = new Ext.FormPanel({ - frame: true, - height: 160, - disabled: !licensed, - - items: [ - { - layout: "column", - items: [ - { - columnWidth: 0.80, - xtype: "container", - items: [ - { - xtype: "checkbox", - id: "chkEeInternetConnection", - name: "chkEeInternetConnection", - checked: (INTERNET_CONNECTION == 1)? true : false, - boxLabel: _('ID_CHECK_UPDATES') - } - ] - }, - { - columnWidth: 0.20, - xtype: "button", - id: "btnEeSetup", - text: _('ID_SAVE'), - handler: function () { - enterpriseProcessAjax("SETUP"); - } - } - ] - } - ] - }); - - var pnlSupport = new Ext.FormPanel({ - frame: true, - height: 160, - disabled: !licensed, - - items: [ - { - layout: "column", - items: [ - { - columnWidth: 0.80, - xtype: "container", - items: [ - { - xtype:'label', - text: _('ID_GENERATE_INFO_SUPPORT'), - name: 'lblGenerateInfoSupport', - labelStyle: 'font-weight:bold;', - } - ] - }, - { - columnWidth: 0.20, - xtype: "button", - id: "btnGenerate", - text: _('ID_GENERATE'), - handler: function () { - enterpriseFileSupport(); - } - } - ] - } - ] - }); - - var licensePanel = new Ext.FormPanel( { - frame: true, - labelAlign: "right", - defaultType: "displayfield", - items: [ - { - id: "license_name", - fieldLabel: _('ID_CURRENT_LICENSE'), - value: license_name - }, - { - id: "license_server", - fieldLabel: _('ID_LICENSE_SERVER'), - value: license_server - }, - { - id: "license_message", - fieldLabel:_('ID_STATUS'), - hidden: licensed, - hideLabel: licensed, - value: ""+license_message+" ("+license_start_date+"/"+license_end_date+")
"+license_user - }, - { - id: "license_user", - fieldLabel: _('ID_ISSUED_TO'), - value: license_user, - hidden: !licensed, - hideLabel: !licensed - }, - { - id: "license_expires", - fieldLabel: _('ID_EXPIRES'), - value: license_expires+'/'+license_span+" ("+license_start_date+" / "+license_end_date+")", - hidden: !licensed, - hideLabel: !licensed - } - ], - buttons : [ - { - text: _('ID_IMPORT_LICENSE'), - disable: false, - handler: function() { - addLicenseWindow.show(); - } - }, - { - text : _('ID_RENEW'), - hidden: true, - disabled : true - } - ] - }); - - var expander = new Ext.grid.RowExpander({ - tpl : new Ext.Template( - '

'+_('ID_DESCRIPTION')+': {description}

' - ) - }); - - var btnUninstall = new Ext.Action({ - //id: "uninstall-btn", - text: _('ID_UNISTALL'), - tooltip: _('ID_UNISTALL_TIP'), - iconCls: "button_menu_ext ss_sprite ss_delete", - handler: function (b, e) { - //The plugin is activated, please deactivate first to remove it. - - var sw = 1; - var msg = ""; - - if (sw == 1 && PATH_PLUGINS_WRITABLE == 0) { - sw = 0; - msg = PATH_PLUGINS_WRITABLE_MESSAGE; - } - - if (sw == 1) { - Ext.MessageBox.confirm( - _('ID_CONFIRM'), - __('ID_CONFIRM_DELETE_PLUGIN')+"

"+__('ID_CONFIRM_DELETE_PLUGIN_WARNING'), - function (btn, text) { - if (btn == "yes") { - swReloadTask = 0; - reloadTask.cancel(); - - var record = addonsGrid.getSelectionModel().getSelected(); - addonsGrid.disable(); - - Ext.Ajax.request({ - url: "addonsStoreAction", - params: { - "action": _('ID_UNISTALL'), - "addon": record.get("id"), - "store": record.get("store") - }, - success: function (response, opts) { - var dataResponse = eval("(" + response.responseText + ")"); //json - swReloadTask = 1; - - if (dataResponse.status && dataResponse.status == "OK") { - parent.parent.window.location.href = newLocation(); - } else { - Ext.MessageBox.alert(_('ID_ERROR_UNISTALLING') + " " + record.get("name"), dataResponse.message); - addonsStore.load(); - } - } - }); - } - } - ); - } else { - Ext.MessageBox.alert(_('ID_WARNING'), msg); - } - } - }); - - var btnEnable = new Ext.Action({ - //id: "enable-btn", - text: _('ID_ENABLE'), - tooltip: _('ID_ENABLE_PLUGIN_TIP'), - iconCls: "button_menu_ext ss_sprite ss_tag_green", - disabled: true, - handler: function (b, e) { - var record = addonsGrid.getSelectionModel().getSelected(); - addonsGrid.disable(); - - Ext.Ajax.request({ - url: "addonsStoreAction", - params: { - "action":"enable", - "addon": record.get("id"), - "store": record.get("store") - }, - callback: function () { - parent.parent.window.location.href = newLocation(); - }, - success: function (response) { - var obj = eval("(" + response.responseText + ")"); //json - - if (!obj.success) { - Ext.MessageBox.alert(_('ID_ERROR_ENABLING') + " " + record.get("name"), obj.error); - } - } - }); - } - }); - - var btnDisable = new Ext.Action({ - //id: "disable-btn", - text: _('ID_DISABLE'), - tooltip: _('ID_DISABLE_PLUGIN_TIP'), - iconCls: "button_menu_ext ss_sprite ss_tag_red", - disabled: true, - handler: function (b, e) { - var record = addonsGrid.getSelectionModel().getSelected(); - addonsGrid.disable(); - - Ext.Ajax.request({ - url: "addonsStoreAction", - params: { - "action":"disable", - "addon": record.get("id"), - "store": record.get("store") - }, - callback: function () { - parent.parent.window.location.href = newLocation(); - }, - success: function (response) { - var obj = eval("(" + response.responseText + ")"); //json - - if (!obj.success) { - Ext.MessageBox.alert(_('ID_ERROR_DISABLING') + " " + record.get("name"), obj.error); - } - } - }); - } - }); - - var btnAdmin = new Ext.Action({ - text: _('ID_ADMIN'), - tooltip: _('ID_ADMIN_PLUGIN_TIP'), - //iconCls: "button_menu_ext ss_sprite ss_cog_edit", - iconCls: "button_menu_ext ss_sprite ss_cog", - disabled: true, - handler: function () { - var record = addonsGrid.getSelectionModel().getSelected(); - addonsGrid.disable(); - - window.location.href = "pluginsSetup?id=" + record.get("id") + ".php"; - } - }); - - var mnuContext = new Ext.menu.Menu({ - //items: [btnUninstall, "-", btnEnable, btnDisable] - items: [btnEnable, btnDisable, btnAdmin] - }); - - var addonsGrid = new Ext.grid.EditorGridPanel({ - store: addonsStore, - defaultType: "displayfield", - padding: 5, - height: 335, - disabled: !licensed, - columns: [ - expander, - { - id : 'icon-column', - header : '', - width : 30, - //sortable : true, - menuDisabled: true, - hideable : false, - dataIndex: 'status', - renderer : function (val, metadata, record, rowIndex, colIndex, store) { - return ""; - } - }, - { - id :'nick-column', - header : _('ID_NAME'), - width : 160, - //sortable : true, - menuDisabled: true, - dataIndex: 'nick', - renderer: function (val, metadata, record, rowIndex, colIndex, store) { - if (record.get('release_type') == 'beta') { - return val + " (Beta)"; - } else if (record.get('release_type') == 'localRegistry') { - return val + " (Local)"; - } else { - return val; - } - } - }, - { - id : 'publisher-column', - header : _('ID_PUBLISHER'), - //sortable : true, - menuDisabled: true, - dataIndex: 'publisher' - }, - { - id : 'version-column', - header : _('ID_VERSION'), - //width : 160, - //sortable : true, - menuDisabled: true, - dataIndex: 'version' - }, - { - id : 'latest-version-column', - header : _('ID_LATEST_VERSION'), - //width : 160, - //sortable : true, - menuDisabled: true, - dataIndex: 'latest_version' - }, - { - id : 'enabled-column', - header : _('ID_ENABLED'), - width : 60, - //sortable : true, - menuDisabled: true, - dataIndex: 'enabled', - renderer: function (val) { - if (val === true) { - return ""; - } else if (val === false) { - return ""; - } - return ''; - } - }, - { - id : "status", - header : "", - width : 120, - //sortable : true, - menuDisabled: true, - hideable : false, - dataIndex: "status", - renderer: function (val) { - var str = ""; - var text = ""; - - switch (val) { - case "available": text = _('ID_BUY_NOW'); break; - case "installed": text = _('ID_INSTALLED'); break; - case "ready": text = _('ID_INSTALL_NOW'); break; - case "upgrade": text = _('ID_UPGRADE_NOW'); break; - case "download": text = _('ID_CANCEL'); break; - case "install": text = _('ID_INSTALLING'); break; - case "cancel": text = _('ID_CANCELLING'); break; - case "disabled": text = _('ID_DISABLED'); break; - case "download-start": text = ""; break; - default: text = val; break; - } - - switch (val) { - case "available": - case "ready": - case "upgrade": - case "download": - case "install": - case "cancel": - case "download-start": - str = "
" + text + "
"; - break; - - case "installed": - case "disabled": - str = "
" + text + "
"; - break; - - default: - str = "
" + text + "
"; - break; - } - - return (str); - } - } - ], - tbar:[ - btnEnable, - btnDisable, - btnAdmin, - '-', - { - id: "import-btn", - text: _('ID_INSTALL_FROM_FILE'), - tooltip: _('ID_INSTALL_FROM_FILE_PLUGIN_TIP'), - iconCls:"button_menu_ext ss_sprite ss_application_add", - - //ref: "../removeButton", - disabled: false, - handler: function () { - var sw = 1; - var msg = ""; - if (sw == 1 && PATH_PLUGINS_WRITABLE == 0) { - sw = 0; - msg = PATH_PLUGINS_WRITABLE_MESSAGE; - } - if (sw == 1) { - addPluginWindow.show(); - } else { - Ext.MessageBox.alert(_('ID_WARNING'), msg); - } - } - }, - '-', - { - id: 'refresh-btn', - text:_('ID_REFRESH_LABEL'), - iconCls:'button_menu_ext ss_sprite ss_database_refresh', - tooltip: _('ID_REFRESH_LABEL_PLUGIN_TIP'), - disabled: (INTERNET_CONNECTION == 1)? false : true, - handler: function (b, e) { - reloadTask.cancel(); - addonsStore.load({ - params: { - "force": true - } - }); - } - }, - '->', - { - xtype:"displayfield", - id:'loading-indicator' - } - ], - plugins: expander, - collapsible: false, - animCollapse: false, - stripeRows: true, - autoExpandColumn: 'nick-column', - //title: _('ID_ENTERPRISE_PLUGINS'), - sm: new Ext.grid.RowSelectionModel({ - singleSelect:true, - listeners: { - selectionchange: function (sel) { - if (sel.getCount() == 0 || sel.getSelected().get("name") == "enterprise") { - //btnUninstall.setDisabled(true); - btnEnable.setDisabled(true); - btnDisable.setDisabled(true); - btnAdmin.setDisabled(true); - } else { - record = sel.getSelected(); - //btnUninstall.setDisabled(!(record.get("status") == "installed" || record.get("status") == "upgrade" || record.get("status") == "disabled")); - btnEnable.setDisabled(!(record.get("enabled") === false)); - btnDisable.setDisabled(!(record.get("enabled") === true)); - btnAdmin.setDisabled(!(record.get("enabled") === true)); - } - } - } - }), - //config options for stateful behavior - stateful: true, - stateId: "grid", - listeners: { - "cellclick": function (grid, rowIndex, columnIndex, e) { - var record = grid.getStore().getAt(rowIndex); - var fieldName = grid.getColumnModel().getDataIndex(columnIndex); - //var data = record.get(fieldName); - - if (fieldName != "status") { - return; - } - - switch (record.get("status")) { - case "upgrade": - case "ready": - if (INTERNET_CONNECTION == 1) { - installAddon(record.get("id"), record.get("store")); - } else { - Ext.MessageBox.alert(_('ID_INFORMATION'), _('ID_NO_INTERNET_CONECTION')); - } - break; - case "download": - Ext.Ajax.request({ - url: "addonsStoreAction", - params: { - "action": "cancel", - "addon": record.get("id"), - "store": record.get("store") - } - }); - break; - case "available": - addonAvailable(record.get("id")); - break; - } - } - } - }); - - // create the Grid Features - var cmodel = new Ext.grid.ColumnModel({ - viewConfig: { - forceFit:true, - cls:"x-grid-empty", - emptyText: _('ID_NO_RECORDS_FOUND') - }, - defaults: { - width: 50 - }, - columns: [ - { - id : 'icon-column-feature', - header : '', - width : 30, - hideable : false, - dataIndex: 'status', - renderer : function (val, metadata, record, rowIndex, colIndex, store) { - return ""; - } - }, - { - id :'nick-column-feature', - header : _('ID_NAME'), - width : 150, - sortable : true, - dataIndex: 'nick', - renderer: function (val, metadata, record, rowIndex, colIndex, store) { - if (record.get('release_type') == 'beta') { - return val + " (Beta)"; - } else { - return val; - } - } - }, - { - id :'description-column-feature', - header : _('ID_DESCRIPTION'), - width : 200, - dataIndex: 'description' - }, - { - id : 'enabled-column-feature', - header : _('ID_ENABLED'), - width : 60, - dataIndex: 'enabled', - renderer: function (val) { - if (val === true) { - return ""; - } else if (val === false) { - return ""; - } - return ''; - } - } - ] - }); - - var addonsFeatureGrid = new Ext.grid.EditorGridPanel({ - region: 'center', - layout: 'fit', - id: 'addonsFeatureGrid', - autoHeight : true, - autoWidth : true, - stateful : true, - stateId : 'addonsFeatureGrid', - enableColumnResize: true, - enableHdMenu: true, - frame:false, - columnLines: false, - viewConfig: { - forceFit:true - }, - disabled: !licensed, - store: addonsFeaturesStore, - cm: cmodel, - tbar: - [ - { - id: 'refresh-btn', - text:_('ID_REFRESH_LABEL'), - iconCls:'button_menu_ext ss_sprite ss_database_refresh', - tooltip: _('ID_REFRESH_LABEL_PLUGIN_TIP'), - disabled: (INTERNET_CONNECTION == 1)? false : true, - handler: function (b, e) { - reloadTask.cancel(); - addonsFeaturesStore.load({ - params: { - "force": true - } - }); - } - }, - '->', - { - xtype:"displayfield", - id:'loading-features-indicator' - } - ], - listeners: { - render: function(){ - this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING_GRID')}); - } - } - }); - - var tabEnterprise = new Ext.TabPanel({ - activeTab: 0, - height: 370, - defaults:{ - autoScroll: true, - layout:'form', - frame:true, - }, - items:[{ - title: _('ID_ENTERPRISE_PLUGINS'), - autoScroll: false, - items : addonsGrid - },{ - title: _('ID_ENTERPRISE_FEATURES'), - items : addonsFeatureGrid - } - ] - }); - var tabSetup= new Ext.TabPanel({ - activeTab: 0, - height: 190, - defaults:{autoScroll: true}, - items:[{ - title: _('ID_YOUR_LICENSE'), - items : licensePanel - },{ - title: _('ID_SETUP_WEBSERVICES'), - items : pnlSetup - },{ - title: _('ID_SUPPORT'), - items : pnlSupport - } - ] - }); - - - var fullBox = new Ext.Panel({ - id:'main-panel-vbox', - region:'west', - margins:'5 0 5 5', - items:[ tabSetup, tabEnterprise] - }); - - addonsGrid.on("rowcontextmenu", - function (grid, rowIndex, evt) { - var sm = grid.getSelectionModel(); - sm.selectRow(rowIndex, sm.isSelected(rowIndex)); - }, - this - ); - - addonsGrid.addListener("rowcontextmenu", onMessageMnuContext, this); - - addonsFeatureGrid.on("rowcontextmenu", - function (grid, rowIndex, evt) { - var sm = grid.getSelectionModel(); - sm.selectRow(rowIndex, sm.isSelected(rowIndex)); - }, - this - ); - - addonsFeatureGrid.addListener("rowcontextmenu", onMessageMnuContext, this); - - /////// - var viewport = new Ext.Viewport({ - layout: "anchor", - anchorSize: { - width:800, - height:600 - }, - items:[fullBox] - }); - - if (licensed) { - addonsStore.load(); - addonsFeaturesStore.load(); - } -}); diff --git a/workflow/engine/xmlform/login/licenseExpired.xml b/workflow/engine/xmlform/login/licenseExpired.xml deleted file mode 100644 index e14f451bb..000000000 --- a/workflow/engine/xmlform/login/licenseExpired.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - License File - - - Update License - - \ No newline at end of file diff --git a/workflow/engine/xmlform/login/licenseExpiredpm3.html b/workflow/engine/xmlform/login/licenseExpiredpm3.html deleted file mode 100644 index d7b856e68..000000000 --- a/workflow/engine/xmlform/login/licenseExpiredpm3.html +++ /dev/null @@ -1,35 +0,0 @@ -
-

{php}echo G::LoadTranslation('ID_LICENCE_LOGIN_TITLE');{/php}

-
- - - - - - - - diff --git a/workflow/engine/xmlform/login/licenseExpiredpm3.xml b/workflow/engine/xmlform/login/licenseExpiredpm3.xml deleted file mode 100644 index 7ac190b58..000000000 --- a/workflow/engine/xmlform/login/licenseExpiredpm3.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - License File - - - Update License - - - \ No newline at end of file diff --git a/workflow/public_html/pmGmail/sso.php b/workflow/public_html/pmGmail/sso.php index a30aa2fa9..10498f04d 100644 --- a/workflow/public_html/pmGmail/sso.php +++ b/workflow/public_html/pmGmail/sso.php @@ -20,7 +20,7 @@ if (!isset($_GET['server']) || $server == "") { throw new \Exception(Bootstrap::LoadTranslation('ID_GMAIL_NEED_SERVER')); } -//First check if the feature is enabled in the license. +//First check if the feature is enabled. $gCurl = curl_init('https://' . $server . '/api/1.0/' . $pmws . '/gmailIntegration/verifyGmailfeature/'); curl_setopt($gCurl, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $pmtoken)); curl_setopt($gCurl, CURLOPT_RETURNTRANSFER, true); @@ -37,7 +37,7 @@ if (curl_exec($gCurl) === false) { curl_close($gCurl); $gResp = G::json_decode($gCurl_response); if ($gResp === false) { - echo Bootstrap::LoadTranslation('ID_NO_LICENSE_FEATURE_ENABLED'); + echo Bootstrap::LoadTranslation('ID_NOT_ENABLED'); die(); } } @@ -102,8 +102,6 @@ if (!isset($_SESSION['USER_LOGGED']) || $_SESSION['USER_LOGGED'] != $decodedResp setcookie('workspaceSkin', $enviroment, $cookieOptions); $_SESSION = array(); - $_SESSION['__EE_INSTALLATION__'] = 2; - $_SESSION['__EE_SW_PMLICENSEMANAGER__'] = 1; $_SESSION['phpLastFileFound'] = ''; $_SESSION['USERNAME_PREVIOUS1'] = $decodedResp->user['0']->USR_USERNAME; $_SESSION['USERNAME_PREVIOUS2'] = $decodedResp->user['0']->USR_USERNAME; diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index 09fb43af1..a2cfd9601 100644 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -974,7 +974,6 @@ if (!defined('EXECUTE_BY_CRON')) { $noLoginFiles[] = 'genericAjax'; $noLoginFiles[] = 'casesSaveDataView'; $noLoginFiles[] = 'propelTableAjax'; - $noLoginFiles[] = 'licenseUpdate'; $noLoginFiles[] = 'casesStreamingFile'; $noLoginFiles[] = 'opencase'; $noLoginFiles[] = 'defaultAjaxDynaform';