Merged in bugfix/HOR-3776 (pull request #6006)
HOR-3776 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
@@ -284,6 +284,7 @@ function processWorkspace()
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||||
|
$oPluginRegistry->init();
|
||||||
|
|
||||||
global $sObject;
|
global $sObject;
|
||||||
global $sLastExecution;
|
global $sLastExecution;
|
||||||
|
|||||||
@@ -57,19 +57,6 @@ if (defined('SYS_SYS') && (!defined('PATH_DATA_SITE') || !defined('PATH_WORKSPAC
|
|||||||
Bootstrap::setConstantsRelatedWs(SYS_SYS);
|
Bootstrap::setConstantsRelatedWs(SYS_SYS);
|
||||||
}
|
}
|
||||||
|
|
||||||
//call plugin
|
|
||||||
if (class_exists( 'folderData' )) {
|
|
||||||
//$folderData = new folderData($sProUid, $proFields['PRO_TITLE'], $sAppUid, $Fields['APP_TITLE'], $sUsrUid);
|
|
||||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
|
||||||
$aAvailablePmFunctions = $oPluginRegistry->getPmFunctions();
|
|
||||||
foreach ($aAvailablePmFunctions as $key => $class) {
|
|
||||||
$filePlugin = PATH_PLUGINS . $class . PATH_SEP . 'classes' . PATH_SEP . 'class.pmFunctions.php';
|
|
||||||
if (file_exists( $filePlugin )) {
|
|
||||||
include_once ($filePlugin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//end plugin
|
|
||||||
//Add External Triggers
|
//Add External Triggers
|
||||||
$dir = G::ExpandPath( "classes" ) . 'triggers';
|
$dir = G::ExpandPath( "classes" ) . 'triggers';
|
||||||
$filesArray = array ();
|
$filesArray = array ();
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ use ProcessMaker\Plugins\Interfaces\TaskExtendedProperty;
|
|||||||
use ProcessMaker\Plugins\Interfaces\ToolbarDetail;
|
use ProcessMaker\Plugins\Interfaces\ToolbarDetail;
|
||||||
use ProcessMaker\Plugins\Interfaces\TriggerDetail;
|
use ProcessMaker\Plugins\Interfaces\TriggerDetail;
|
||||||
use ProcessMaker\Plugins\Traits\Attributes;
|
use ProcessMaker\Plugins\Traits\Attributes;
|
||||||
|
use ProcessMaker\Plugins\Traits\Init;
|
||||||
use ProcessMaker\Plugins\Traits\PluginStructure;
|
use ProcessMaker\Plugins\Traits\PluginStructure;
|
||||||
use Publisher;
|
use Publisher;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
@@ -43,6 +44,7 @@ class PluginRegistry
|
|||||||
{
|
{
|
||||||
use PluginStructure;
|
use PluginStructure;
|
||||||
use Attributes;
|
use Attributes;
|
||||||
|
use Init;
|
||||||
|
|
||||||
const NAME_CACHE = SYS_SYS . __CLASS__;
|
const NAME_CACHE = SYS_SYS . __CLASS__;
|
||||||
/**
|
/**
|
||||||
|
|||||||
33
workflow/engine/src/ProcessMaker/Plugins/Traits/Init.php
Normal file
33
workflow/engine/src/ProcessMaker/Plugins/Traits/Init.php
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace ProcessMaker\Plugins\Traits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Trait Init
|
||||||
|
* @package ProcessMaker\Plugins\Traits
|
||||||
|
*/
|
||||||
|
trait Init
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Initialization of functions and others of a plugin
|
||||||
|
*/
|
||||||
|
public function init()
|
||||||
|
{
|
||||||
|
$this->initFunction();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialization of plugin pmFunctions
|
||||||
|
*/
|
||||||
|
private function initFunction()
|
||||||
|
{
|
||||||
|
$pmFunctions = $this->getPmFunctions();
|
||||||
|
foreach ($pmFunctions as $namespace) {
|
||||||
|
$filePmFunctions = PATH_PLUGINS . $namespace . PATH_SEP . 'classes' . PATH_SEP . 'class.pmFunctions.php';
|
||||||
|
if (file_exists($filePmFunctions) && $this->isEnable($namespace)) {
|
||||||
|
include_once($filePmFunctions);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1023,6 +1023,8 @@ if (! defined( 'EXECUTE_BY_CRON' )) {
|
|||||||
}
|
}
|
||||||
$_SESSION['phpLastFileFound'] = $_SERVER['REQUEST_URI'];
|
$_SESSION['phpLastFileFound'] = $_SERVER['REQUEST_URI'];
|
||||||
|
|
||||||
|
// Initialization functions plugins
|
||||||
|
$oPluginRegistry->init();
|
||||||
/**
|
/**
|
||||||
* New feature for Gulliver framework to support Controllers & HttpProxyController classes handling
|
* New feature for Gulliver framework to support Controllers & HttpProxyController classes handling
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user