From a869888d78599f08fdf39d8b3b26ce939d74666e Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Fri, 20 Jun 2014 16:21:23 -0400 Subject: [PATCH] BUG 15153 Call to undefined function SOLVED - The pmFunctions from the plugins not loaded before include pmScript class - Change the includes order of the related classes --- workflow/engine/bin/cron_single.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/workflow/engine/bin/cron_single.php b/workflow/engine/bin/cron_single.php index 928eb67a0..6bf7f19b1 100755 --- a/workflow/engine/bin/cron_single.php +++ b/workflow/engine/bin/cron_single.php @@ -326,9 +326,7 @@ Bootstrap::registerClass('UsersPeer', PATH_HOME . "engine/classes/mode Bootstrap::registerClass('Xml_Node', PATH_GULLIVER . "class.xmlDocument.php"); -G::LoadClass("case"); G::LoadClass("dates"); -G::LoadClass("pmScript"); if (!defined('SYS_SYS')) { $sObject = $argv[1]; @@ -451,6 +449,13 @@ if (!defined('SYS_SYS')) { function processWorkspace() { try { + Bootstrap::LoadClass("plugin"); + $oPluginRegistry =& PMPluginRegistry::getSingleton(); + if (file_exists(PATH_DATA_SITE . 'plugin.singleton')) { + $oPluginRegistry->unSerializeInstance(file_get_contents(PATH_DATA_SITE . 'plugin.singleton')); + } + Bootstrap::LoadClass("case"); + global $sObject; global $sLastExecution; @@ -578,11 +583,7 @@ function executePlugins() // Executing registered cron files // -> Get registered cron files - Bootstrap::LoadClass( 'plugin' ); $oPluginRegistry =& PMPluginRegistry::getSingleton(); - if (file_exists(PATH_DATA_SITE . 'plugin.singleton')) { - $oPluginRegistry->unSerializeInstance(file_get_contents(PATH_DATA_SITE . 'plugin.singleton')); - } $cronFiles = $oPluginRegistry->getCronFiles(); // -> Execute functions