fixed errors in massive operation edit modules

Former-commit-id: 2d2fa21660369607e6c206d269b12d2041f74a1a
This commit is contained in:
daniel 2018-12-24 08:59:23 +01:00
parent 86b1a3e424
commit 7e2fb25e27
1 changed files with 6 additions and 10 deletions

View File

@ -51,31 +51,27 @@ if ($update) {
$agents_ = array(); $agents_ = array();
$force = get_parameter('force_type', false); $force = get_parameter('force_type', false);
if ($agents_select == false) { if ($agents_select == false) {
$agents_select = array(); $agents_select = array();
} }
foreach ($agents_select as $agent_name) {
$agents_[] = agents_get_agent_id($agent_name);
}
$agents_ = $agents_select;
$modules_ = $module_name; $modules_ = $module_name;
} }
else if ($selection_mode == 'agents') { else if ($selection_mode == 'agents') {
$force = get_parameter('force_group', false); $force = get_parameter('force_group', false);
$agents_ = $agents_id; $agents_ = $agents_id;
$modules_ = $modules_select; $modules_ = $modules_select;
} }
$success = 0; $success = 0;
$count = 0; $count = 0;
if ($agents_ == false) if ($agents_ == false)
$agents_ = array(); $agents_ = array();
// If the option to select all of one group or module type is checked // If the option to select all of one group or module type is checked
if ($force) { if ($force) {
if ($force == 'type') { if ($force == 'type') {