From 318b08885c4d993c1cb5f8822903dfb90a798030 Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Wed, 24 Jan 2018 17:15:38 -0400 Subject: [PATCH 1/3] HOR-4284 --- workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php | 2 ++ workflow/public_html/sysGeneric.php | 1 + 2 files changed, 3 insertions(+) diff --git a/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php b/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php index bb13dcf11..33a9323ec 100644 --- a/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php +++ b/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php @@ -174,6 +174,8 @@ class PluginRegistry $Plugin = new $className($pluginDetail->getNamespace(), $pluginDetail->getFile()); $this->_aPlugins[$pluginDetail->getNamespace()] = $Plugin; $iPlugins++; + $Plugin->registerPmFunction(); + $this->init(); $Plugin->setup(); } } diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index 9b19af1a3..6d1fe10c1 100644 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -695,6 +695,7 @@ if (defined( 'DEBUG_SQL_LOG' ) && DEBUG_SQL_LOG) { //here we are loading all plugins registered //the singleton has a list of enabled plugins $oPluginRegistry = PluginRegistry::loadSingleton(); +$oPluginRegistry->init(); $attributes = $oPluginRegistry->getAttributes(); Bootstrap::LoadTranslationPlugins( defined( 'SYS_LANG' ) ? SYS_LANG : "en" , $attributes); From 5ae4ea8e3801c382feafa55687177506d4e221c7 Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Thu, 25 Jan 2018 09:57:49 -0400 Subject: [PATCH 2/3] HOR-4284 --- workflow/public_html/sysGeneric.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index 6d1fe10c1..b08a6ec96 100644 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -695,9 +695,10 @@ if (defined( 'DEBUG_SQL_LOG' ) && DEBUG_SQL_LOG) { //here we are loading all plugins registered //the singleton has a list of enabled plugins $oPluginRegistry = PluginRegistry::loadSingleton(); -$oPluginRegistry->init(); $attributes = $oPluginRegistry->getAttributes(); -Bootstrap::LoadTranslationPlugins( defined( 'SYS_LANG' ) ? SYS_LANG : "en" , $attributes); +Bootstrap::LoadTranslationPlugins(defined('SYS_LANG') ? SYS_LANG : "en", $attributes); +// Initialization functions plugins +$oPluginRegistry->init(); //Set Time Zone /*----------------------------------********---------------------------------*/ From c1e9fac812520c6348d8e7852fbfc05422ef7c6e Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Thu, 25 Jan 2018 14:24:40 -0400 Subject: [PATCH 3/3] HOR-4284 --- workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php b/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php index 33a9323ec..ae4afe370 100644 --- a/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php +++ b/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php @@ -484,6 +484,9 @@ class PluginRegistry $className = $detail->getClassName(); /** @var enterprisePlugin $oPlugin */ $oPlugin = new $className($detail->getNamespace(), $detail->getFile()); + $oPlugin->registerPmFunction(); + $detail->setEnabled(true); + $this->init(); $oPlugin->setup(); $this->_aPlugins[$detail->getNamespace()] = $oPlugin; $oPlugin->install();