Upgrade PHP files

This commit is contained in:
Fernando Ontiveros
2025-03-28 13:16:06 +00:00
parent 7f3ee186de
commit 039ade9083
83 changed files with 96 additions and 745 deletions

View File

@@ -1,6 +1,5 @@
<?php
/*----------------------------------********---------------------------------*/
CLI::taskName('change-password-hash-method');
CLI::taskDescription(<<<EOT
Change password hash method to md5 or sha256 for the specified workspace
@@ -9,7 +8,6 @@ EOT
CLI::taskArg('workspace', false);
CLI::taskArg('hash', false);
CLI::taskRun("change_hash");
/*----------------------------------********---------------------------------*/
function run_addon_core_install($args)
{
@@ -53,7 +51,7 @@ function run_addon_core_install($args)
$addon->setState("error");
}
}
/*----------------------------------********---------------------------------*/
function change_hash($command, $opts)
{
if (count($command) < 2) {
@@ -91,4 +89,3 @@ function change_hash($command, $opts)
}
}
}
/*----------------------------------********---------------------------------*/

View File

@@ -9,11 +9,8 @@ CLI::taskOpt('child', "Used by the main upgrade thread", 'child', 'child');
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('nomafe', 'If this option is enabled, the MAFE files translation is not built.', 'nomafe', 'no-mafe');
/*----------------------------------********---------------------------------*/
CLI::taskOpt('keep_dyn_content', "Include the DYN_CONTENT_HISTORY value. Ex: --keep_dyn_content", 'i', 'keep_dyn_content');
/*----------------------------------********---------------------------------*/
CLI::taskRun("run_upgrade");
/*----------------------------------********---------------------------------*/
CLI::taskName('unify-database');
CLI::taskDescription(
@@ -31,11 +28,9 @@ CLI::taskDescription(
of ProcessMaker.
EOT
);
/*----------------------------------********---------------------------------*/
CLI::taskArg('workspace');
/*----------------------------------********---------------------------------*/
CLI::taskRun("run_unify_database");
/*----------------------------------********---------------------------------*/
CLI::taskName('upgrade-query');
CLI::taskRun('runUpgradeQuery');
@@ -52,10 +47,7 @@ function run_upgrade($parameters, $args)
$mainThread = $printHF = !array_key_exists('child', $args);
$updateXmlForms = !array_key_exists('noxml', $args);
$updateMafe = !array_key_exists('nomafe', $args);
$keepDynContent = false;
/*----------------------------------********---------------------------------*/
$keepDynContent = array_key_exists('keep_dyn_content', $args); //In community version this section will be removed
/*----------------------------------********---------------------------------*/
$keepDynContent = array_key_exists('keep_dyn_content', $args);
// Initializing variables
$globalStartTime = microtime(true);
@@ -199,7 +191,6 @@ function run_upgrade($parameters, $args)
}
}
/*----------------------------------********---------------------------------*/
function run_unify_database($args)
{
$workspaces = array();
@@ -305,7 +296,6 @@ function run_unify_database($args)
}
$flag = G::isPMUnderUpdating(0);
}
/*----------------------------------********---------------------------------*/
/**
* Execute a query, used internally for upgrade process

View File

@@ -180,7 +180,6 @@ EOT
CLI::taskArg('workspace', true, true);
CLI::taskRun("run_migrate_itee_to_dummytask");
/*----------------------------------********---------------------------------*/
CLI::taskName("check-workspace-disabled-code");
CLI::taskDescription(<<<EOT
Check disabled code for the specified workspace(s).
@@ -219,7 +218,6 @@ EOT
);
CLI::taskArg('workspace', true, true);
CLI::taskRun("run_migrate_list_unassigned");
/*----------------------------------********---------------------------------*/
CLI::taskName('migrate-indexing-acv');
CLI::taskDescription(<<<EOT
@@ -313,7 +311,6 @@ EOT
CLI::taskArg('workspace');
CLI::taskRun("regenerate_pmtable_classes");
/*----------------------------------********---------------------------------*/
/**
* Migrate the data from APP_HISTORY table to the new table APP_DATA_CHANGE_LOG.
*/
@@ -324,7 +321,6 @@ EOT
);
CLI::taskArg('workspace');
CLI::taskRun('migrate_history_data');
/*----------------------------------********---------------------------------*/
/**
* Remove the DYN_CONTENT_HISTORY
@@ -895,9 +891,7 @@ function run_workspace_restore($args, $opts)
$lang = array_key_exists("lang", $opts) ? $opts['lang'] : 'en';
$port = array_key_exists("port", $opts) ? $opts['port'] : '';
$optionMigrateHistoryData = [
/*----------------------------------********---------------------------------*/
'keepDynContent' => array_key_exists('keep_dyn_content', $args)
/*----------------------------------********---------------------------------*/
];
if ($info) {
WorkspaceTools::getBackupInfo($filename);
@@ -1031,7 +1025,6 @@ function run_migrate_itee_to_dummytask($args, $opts)
}
}
}
/*----------------------------------********---------------------------------*/
/**
* Check if we need to execute an external program for each workspace
@@ -1167,7 +1160,6 @@ function migrate_list_unassigned($command, $args)
}
}
}
/*----------------------------------********---------------------------------*/
/**
* Check if we need to execute an external program for each workspace
@@ -1300,7 +1292,6 @@ function regenerate_pmtable_classes($args, $opts)
}
}
/*----------------------------------********---------------------------------*/
/**
* This method migrates data from APP_HISTORY table to APP_DATA_CHANGE_LOG table.
*
@@ -1327,7 +1318,6 @@ function migrate_history_data($args, $opts)
}
}
}
/*----------------------------------********---------------------------------*/
/**
* Will be clean the History of use from the table