mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
#11660 fixed error 500
This commit is contained in:
parent
4d58240ce3
commit
6074103e78
@ -144,6 +144,10 @@ if ($update) {
|
|||||||
$error_msg = __('Error updating the modules from a module type');
|
$error_msg = __('Error updating the modules from a module type');
|
||||||
}
|
}
|
||||||
} else if ($force === 'group') {
|
} else if ($force === 'group') {
|
||||||
|
if (empty($modules_) === true) {
|
||||||
|
$modules_ = [];
|
||||||
|
}
|
||||||
|
|
||||||
$agents_ = array_keys(agents_get_group_agents($group_select, false, 'none'));
|
$agents_ = array_keys(agents_get_group_agents($group_select, false, 'none'));
|
||||||
|
|
||||||
foreach ($agents_ as $id_agent) {
|
foreach ($agents_ as $id_agent) {
|
||||||
@ -161,6 +165,7 @@ if ($update) {
|
|||||||
foreach ($module_name as $mod_name) {
|
foreach ($module_name as $mod_name) {
|
||||||
$result = process_manage_edit($mod_name['nombre'], $id_agent, $module_status, $modules_selection_mode);
|
$result = process_manage_edit($mod_name['nombre'], $id_agent, $module_status, $modules_selection_mode);
|
||||||
$count++;
|
$count++;
|
||||||
|
$modules_[] = $mod_name['nombre'];
|
||||||
$success += (int) $result;
|
$success += (int) $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -193,6 +198,9 @@ if ($update) {
|
|||||||
__('Successfully updated').'('.$success.'/'.$count.')',
|
__('Successfully updated').'('.$success.'/'.$count.')',
|
||||||
$error_msg
|
$error_msg
|
||||||
);
|
);
|
||||||
|
if (empty($modules_) === true || is_array($modules_) === false) {
|
||||||
|
$modules_ = [];
|
||||||
|
}
|
||||||
|
|
||||||
$info = '{"Modules":"'.implode(',', $modules_).'","Agents":"'.implode(',', $agents_).'"}';
|
$info = '{"Modules":"'.implode(',', $modules_).'","Agents":"'.implode(',', $agents_).'"}';
|
||||||
if ($success > 0) {
|
if ($success > 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user