From 729527cff88bdfa7f01a358751df3187b285c396 Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Wed, 15 Aug 2018 14:59:13 -0400 Subject: [PATCH 1/2] HOR-4808 --- workflow/engine/classes/Processes.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/workflow/engine/classes/Processes.php b/workflow/engine/classes/Processes.php index e5feaa43d..c0534f69c 100644 --- a/workflow/engine/classes/Processes.php +++ b/workflow/engine/classes/Processes.php @@ -3791,11 +3791,13 @@ class Processes * Get Task User rows from an array of data * * @param array $group - * @return array $aStepTrigger + * + * @return void */ public function createGroupRow($group) { foreach ($group as $key => $row) { + $groupInfo = []; $groupWf = new Groupwf(); if ($groupWf->GroupwfExists($row['GRP_UID'])) { $groupInfo = $groupWf->Load($row['GRP_UID']); From 8701179997929506bfb6dbc43447b1ec0dee6b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20Cesar=20Laura=20Avenda=C3=B1o?= Date: Wed, 15 Aug 2018 15:05:23 -0400 Subject: [PATCH 2/2] HOR-4810 --- .../engine/controllers/InstallerModule.php | 79 ++----------------- .../src/ProcessMaker/Core/Installer.php | 5 +- 2 files changed, 12 insertions(+), 72 deletions(-) diff --git a/workflow/engine/controllers/InstallerModule.php b/workflow/engine/controllers/InstallerModule.php index 5962057a1..51e3c2181 100644 --- a/workflow/engine/controllers/InstallerModule.php +++ b/workflow/engine/controllers/InstallerModule.php @@ -900,13 +900,14 @@ class InstallerModule extends Controller file_exists(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerAppDelegationUpdate.sql') && file_exists(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerApplicationUpdate.sql') && file_exists(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerApplicationDelete.sql') && + file_exists(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerSubApplicationInsert.sql') && file_exists(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerContentUpdate.sql')) { - DB::connection(self::CONNECTION_INSTALL)->raw(file_get_contents(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerAppDelegationInsert.sql')); - DB::connection(self::CONNECTION_INSTALL)->raw(file_get_contents(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerAppDelegationUpdate.sql')); - DB::connection(self::CONNECTION_INSTALL)->raw(file_get_contents(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerApplicationUpdate.sql')); - DB::connection(self::CONNECTION_INSTALL)->raw(file_get_contents(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerApplicationDelete.sql')); - DB::connection(self::CONNECTION_INSTALL)->raw(file_get_contents(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerSubApplicationInsert.sql')); - DB::connection(self::CONNECTION_INSTALL)->raw(file_get_contents(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerContentUpdate.sql')); + DB::connection(self::CONNECTION_INSTALL)->unprepared(file_get_contents(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerAppDelegationInsert.sql')); + DB::connection(self::CONNECTION_INSTALL)->unprepared(file_get_contents(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerAppDelegationUpdate.sql')); + DB::connection(self::CONNECTION_INSTALL)->unprepared(file_get_contents(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerApplicationUpdate.sql')); + DB::connection(self::CONNECTION_INSTALL)->unprepared(file_get_contents(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerApplicationDelete.sql')); + DB::connection(self::CONNECTION_INSTALL)->unprepared(file_get_contents(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerSubApplicationInsert.sql')); + DB::connection(self::CONNECTION_INSTALL)->unprepared(file_get_contents(PATH_HOME . 'engine/methods/setup/setupSchemas/triggerContentUpdate.sql')); DB::connection(self::CONNECTION_INSTALL) ->table('CONFIGURATION') @@ -954,71 +955,7 @@ class InstallerModule extends Controller file_put_contents(FILE_PATHS_INSTALLED, $dbText); } - /** - * AppCacheView Build - */ - define('HASH_INSTALLATION', $h); - define('SYSTEM_HASH', $sh); - define('PATH_DB', $pathShared . 'sites' . PATH_SEP); - define('SYS_SYS', $workspace); - config(['system.workspace' => $workspace]); - - System::setConnectionConfig( - 'mysql', - $db_host, - $wf_workspace, - $wfGrantUser, - $wfPass, - $db_host, - $wf_workspace, - $wfGrantUser, - $wfPass, - $db_host, - $wf_workspace, - $wfGrantUser, - $wfPass); - - require_once('propel/Propel.php'); - - Propel::init(PATH_CORE . 'config/databases.php'); - $con = Propel::getConnection('workflow'); - - require_once('classes/model/AppCacheView.php'); - $lang = 'en'; - - //setup the appcacheview object, and the path for the sql files - $appCache = new AppCacheView(); - - $appCache->setPathToAppCacheFiles(PATH_METHODS . 'setup' . PATH_SEP . 'setupSchemas' . PATH_SEP); - - //Update APP_DELEGATION.DEL_LAST_INDEX data - $res = $appCache->updateAppDelegationDelLastIndex($lang, true); - - //APP_DELEGATION INSERT - $res = $appCache->triggerAppDelegationInsert($lang, true); - - //APP_DELEGATION Update - $res = $appCache->triggerAppDelegationUpdate($lang, true); - - //APPLICATION UPDATE - $res = $appCache->triggerApplicationUpdate($lang, true); - - //APPLICATION DELETE - $res = $appCache->triggerApplicationDelete($lang, true); - - //SUB_APPLICATION INSERT - $res = $appCache->triggerSubApplicationInsert($lang, false); - - //CONTENT UPDATE - $res = $appCache->triggerContentUpdate($lang, true); - - //build using the method in AppCacheView Class - $res = $appCache->fillAppCacheView($lang); - - //end AppCacheView Build - - - //erik: for new env conf handling + // for new env conf handling $envFile = PATH_CONFIG . 'env.ini'; // getting configuration from env.ini diff --git a/workflow/engine/src/ProcessMaker/Core/Installer.php b/workflow/engine/src/ProcessMaker/Core/Installer.php index 89560a0f2..1706e684a 100644 --- a/workflow/engine/src/ProcessMaker/Core/Installer.php +++ b/workflow/engine/src/ProcessMaker/Core/Installer.php @@ -550,7 +550,7 @@ class Installer */ private function runTrigger($query, $description = '', $connection = self::CONNECTION_INSTALL) { - $this->run_query($query, $description, $connection, 'RAW'); + $this->run_query($query, $description, $connection, 'UNPREPARED'); } /** @@ -573,6 +573,9 @@ class Installer case 'RAW': DB::connection($connection)->raw($query); break; + case 'UNPREPARED': + DB::connection($connection)->unprepared($query); + break; } } catch (QueryException $exception) {