remove cnn.php

This commit is contained in:
IsaiDiaz
2025-06-27 12:06:00 -04:00
parent 2cfcc84510
commit 9ae42fc7e4
2 changed files with 25 additions and 146 deletions

View File

@@ -2301,31 +2301,32 @@ function run_check_standard_code($task, $options)
}
}
function run_update_plugin_attributes($task, $args)
{
try {
//Verify data
if (!isset($args[0])) {
throw new Exception("Error: You must specify the name of a plugin");
}
//Set variables
$pluginName = $args[0];
// virtual SYS_SYS for cache
$sys_sys = uniqid();
define('SYS_SYS', $sys_sys);
config(["system.workspace" => $sys_sys]);
foreach (PmSystem::listWorkspaces() as $value) {
\ProcessMaker\Util\Cnn::connect($value->name);
//Update plugin attributes
$pmPluginRegistry = PluginRegistry::newInstance();
$pmPluginRegistry->updatePluginAttributesInAllWorkspaces($value->name, $pluginName);
}
// Commented out due to cnn.php deletion
// function run_update_plugin_attributes($task, $args)
// {
// try {
// //Verify data
// if (!isset($args[0])) {
// throw new Exception("Error: You must specify the name of a plugin");
// }
// //Set variables
// $pluginName = $args[0];
// // virtual SYS_SYS for cache
// $sys_sys = uniqid();
// define('SYS_SYS', $sys_sys);
// config(["system.workspace" => $sys_sys]);
// foreach (PmSystem::listWorkspaces() as $value) {
// \ProcessMaker\Util\Cnn::connect($value->name);
// //Update plugin attributes
// $pmPluginRegistry = PluginRegistry::newInstance();
// $pmPluginRegistry->updatePluginAttributesInAllWorkspaces($value->name, $pluginName);
// }
echo "Done!\n";
} catch (Exception $e) {
error_log($e->getMessage() . "\n");
}
}
// echo "Done!\n";
// } catch (Exception $e) {
// error_log($e->getMessage() . "\n");
// }
// }
function run_check_plugin_disabled_code($task, $args)
{