From 9a8f62b94b8a8f1f1e4bb64be3166ca2c41bac83 Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Fri, 15 Jun 2018 16:24:13 -0400 Subject: [PATCH] HOR-4675 --- workflow/engine/bin/tasks/cliUpgrade.php | 4 ++-- workflow/engine/bin/tasks/cliWorkspaces.php | 14 +++++++------- workflow/engine/classes/WorkspaceTools.php | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/workflow/engine/bin/tasks/cliUpgrade.php b/workflow/engine/bin/tasks/cliUpgrade.php index 10ef35328..a1d181dcf 100644 --- a/workflow/engine/bin/tasks/cliUpgrade.php +++ b/workflow/engine/bin/tasks/cliUpgrade.php @@ -9,7 +9,7 @@ CLI::taskDescription("Upgrade workspaces.\n\n This command should be run after u CLI::taskOpt('buildACV', 'If this option is enabled, the Cache View is built.', 'ACV', 'buildACV'); CLI::taskOpt('noxml', 'If this option is enabled, the XML files translation is not built.', 'NoXml', 'no-xml'); /*----------------------------------********---------------------------------*/ -CLI::taskOpt('include_dyn_content', "Include the DYN_CONTENT_HISTORY value. Ex: --include_dyn_content", 'i', 'include_dyn_content'); +CLI::taskOpt('keep_dyn_content', "Include the DYN_CONTENT_HISTORY value. Ex: --keep_dyn_content", 'i', 'keep_dyn_content'); /*----------------------------------********---------------------------------*/ CLI::taskRun("run_upgrade"); /*----------------------------------********---------------------------------*/ @@ -112,7 +112,7 @@ function run_upgrade($command, $args) $flagUpdateXml = !array_key_exists('noxml', $args); $optionMigrateHistoryData = [ /*----------------------------------********---------------------------------*/ - 'includeDynContent' => array_key_exists('include_dyn_content', $args) + 'keepDynContent' => array_key_exists('keep_dyn_content', $args) /*----------------------------------********---------------------------------*/ ]; diff --git a/workflow/engine/bin/tasks/cliWorkspaces.php b/workflow/engine/bin/tasks/cliWorkspaces.php index 4c60f9918..e99cf4351 100644 --- a/workflow/engine/bin/tasks/cliWorkspaces.php +++ b/workflow/engine/bin/tasks/cliWorkspaces.php @@ -51,7 +51,7 @@ CLI::taskOpt("workspace", "Specify which workspace to restore if multiple worksp CLI::taskOpt("lang", "Specify the language which will be used to rebuild the case cache list. If this option isn't included, then 'en' (English) will be used by default.", "l:", "lang="); CLI::taskOpt("port", "Specify the port number used by MySQL. If not specified, then the port 3306 will be used by default.", "p:"); /*----------------------------------********---------------------------------*/ -CLI::taskOpt('include_dyn_content', "Include the DYN_CONTENT_HISTORY value. Ex: --include_dyn_content", 'd', 'include_dyn_content'); +CLI::taskOpt('keep_dyn_content', "Include the DYN_CONTENT_HISTORY value. Ex: --keep_dyn_content", 'd', 'keep_dyn_content'); /*----------------------------------********---------------------------------*/ CLI::taskRun("run_workspace_restore"); @@ -356,7 +356,7 @@ EOT ); CLI::taskArg('workspace'); CLI::taskRun('migrate_history_data'); -CLI::taskOpt('include_dyn_content', "Include the DYN_CONTENT_HISTORY value. Ex: --include_dyn_content", 'i', 'include_dyn_content'); +CLI::taskOpt('keep_dyn_content', "Include the DYN_CONTENT_HISTORY value. Ex: --keep_dyn_content", 'i', 'keep_dyn_content'); /*----------------------------------********---------------------------------*/ /** @@ -859,7 +859,7 @@ function run_workspace_restore($args, $opts) $port = array_key_exists("port", $opts) ? $opts['port'] : ''; $optionMigrateHistoryData = [ /*----------------------------------********---------------------------------*/ - 'includeDynContent' => array_key_exists('include_dyn_content', $args) + 'keepDynContent' => array_key_exists('keep_dyn_content', $args) /*----------------------------------********---------------------------------*/ ]; if ($info) { @@ -1301,17 +1301,17 @@ function regenerate_pmtable_classes($args, $opts) function migrate_history_data($args, $opts) { foreach ($args as $key => $value) { - if ($args[$key] === '--include_dyn_content' || $args[$key] === '-i') { + if ($args[$key] === '--keep_dyn_content' || $args[$key] === '-i') { unset($args[$key]); - $opts['include_dyn_content'] = ''; + $opts['keep_dyn_content'] = ''; } } $option = ''; $removedDynContentHistory = true; - $exist = array_key_exists('include_dyn_content', $opts); + $exist = array_key_exists('keep_dyn_content', $opts); if ($exist) { $removedDynContentHistory = false; - $option = '--include_dyn_content'; + $option = '--keep_dyn_content'; } if (count($args) === 1) { $start = microtime(true); diff --git a/workflow/engine/classes/WorkspaceTools.php b/workflow/engine/classes/WorkspaceTools.php index 81c727c48..6a1c2f9e3 100644 --- a/workflow/engine/classes/WorkspaceTools.php +++ b/workflow/engine/classes/WorkspaceTools.php @@ -344,10 +344,10 @@ class WorkspaceTools CLI::logging("<*> Migrating and populating plugin singleton data took " . ($stop - $start) . " seconds.\n"); /*----------------------------------********---------------------------------*/ - $includeDynContent = isset($optionMigrateHistoryData['includeDynContent']) && $optionMigrateHistoryData['includeDynContent'] === true; + $keepDynContent = isset($optionMigrateHistoryData['keepDynContent']) && $optionMigrateHistoryData['keepDynContent'] === true; $start = microtime(true); CLI::logging("> Migrating history data...\n"); - $this->migrateAppHistoryToAppDataChangeLog(false, !$includeDynContent); + $this->migrateAppHistoryToAppDataChangeLog(false, !$keepDynContent); $stop = microtime(true); CLI::logging("<*> Migrating history data took " . ($stop - $start) . " seconds.\n"); /*----------------------------------********---------------------------------*/ @@ -2067,10 +2067,10 @@ class WorkspaceTools passthru(PHP_BINARY . ' processmaker regenerate-pmtable-classes ' . $workspace->name); /*----------------------------------********---------------------------------*/ - $includeDynContent = isset($optionMigrateHistoryData['includeDynContent']) && $optionMigrateHistoryData['includeDynContent'] === true; + $keepDynContent = isset($optionMigrateHistoryData['keepDynContent']) && $optionMigrateHistoryData['keepDynContent'] === true; $start = microtime(true); CLI::logging("> Migrating history data...\n"); - $workspace->migrateAppHistoryToAppDataChangeLog(false, !$includeDynContent); + $workspace->migrateAppHistoryToAppDataChangeLog(false, !$keepDynContent); $stop = microtime(true); CLI::logging("<*> Migrating history data took " . ($stop - $start) . " seconds.\n"); /*----------------------------------********---------------------------------*/