From 638b5af7bffde2ff3d772801b8f38ceb5e7f9b95 Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Tue, 15 Aug 2017 12:42:55 -0400 Subject: [PATCH] HOR-3676 --- workflow/engine/bin/cron_single.php | 1 - workflow/engine/classes/PmDynaform.php | 3 +- .../BusinessModel/EmailServer.php | 28 +++++++++++++------ 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/workflow/engine/bin/cron_single.php b/workflow/engine/bin/cron_single.php index 95ff5c04a..6b6525bd2 100644 --- a/workflow/engine/bin/cron_single.php +++ b/workflow/engine/bin/cron_single.php @@ -232,7 +232,6 @@ try { processWorkspace(); break; case 'ldapcron': - require_once(PATH_HOME . 'engine' . PATH_SEP . 'classes' . PATH_SEP . 'class.ldapAdvanced.php'); require_once(PATH_HOME . 'engine' . PATH_SEP . 'methods' . PATH_SEP . 'services' . PATH_SEP . 'ldapadvanced.php'); $ldapadvancedClassCron = new ldapadvancedClassCron(); diff --git a/workflow/engine/classes/PmDynaform.php b/workflow/engine/classes/PmDynaform.php index 5ef326550..5406cf544 100644 --- a/workflow/engine/classes/PmDynaform.php +++ b/workflow/engine/classes/PmDynaform.php @@ -6,7 +6,8 @@ use ProcessMaker\Core\System; * Implementing pmDynaform library in the running case. * * @package engine.classes - */class PmDynaform + */ +class PmDynaform { public static $instance = null; diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/EmailServer.php b/workflow/engine/src/ProcessMaker/BusinessModel/EmailServer.php index 4fd3b5702..309562b79 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/EmailServer.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/EmailServer.php @@ -44,20 +44,29 @@ class EmailServer foreach ($this->arrayFieldDefinition as $key => $value) { $this->arrayFieldNameForException[$value["fieldNameAux"]] = $key; } - - //Define the variables for the logging - global $RBAC; + } catch (Exception $e) { + throw $e; + } + } + + /** + * Get the default information from the context. + * + * @global type $RBAC + * @return void + */ + public function getDefaultContextLog() + { + //Define the variables for the logging + global $RBAC; + if ($RBAC !== null) { $currentUser = $RBAC->aUserInfo['USER_INFO']; $info = array( 'ip' => G::getIpAddress(), - 'workspace' => (defined("SYS_SYS"))? SYS_SYS : "Workspace undefined", + 'workspace' => (defined("SYS_SYS")) ? SYS_SYS : "Workspace undefined", 'usrUid' => $currentUser['USR_UID'] ); $this->setContextLog($info); - - - } catch (Exception $e) { - throw $e; } } @@ -818,6 +827,7 @@ class EmailServer } //Logging the create action + $this->getDefaultContextLog(); $info = array( 'action' => 'Create email server', 'messUid'=> $emailServerUid, @@ -988,6 +998,7 @@ class EmailServer } //Logging the update action + $this->getDefaultContextLog(); $info = array( 'action' => 'Update email server', 'messUid' => $emailServerUid, @@ -1049,6 +1060,7 @@ class EmailServer \EmailServerPeer::doDelete($criteria); //Logging the delete action + $this->getDefaultContextLog(); $info = array( 'action' => 'Delete email server', 'messUid' => $emailServerUid