Fixed agents/modules view. it shows nothing if there are no agents and modules selected

This commit is contained in:
danielmaya 2018-10-03 10:31:45 +02:00
parent f767474516
commit 942c5391f9
1 changed files with 5 additions and 4 deletions

View File

@ -70,7 +70,7 @@ function mainAgentsModules() {
$hor_offset = (int)get_parameter('hor_offset', 0);
$block = $config['block_size'];
if(get_parameter('modulegroup') != null){
$agents_id = (array)get_parameter('id_agents2', -1);
$agents_id = (array)get_parameter('id_agents2', null);
}
$selection_a_m = (int)get_parameter('selection_agent_module');
$modules_selected = (array)get_parameter('module', 0);
@ -135,8 +135,6 @@ function mainAgentsModules() {
}
}
$groups = users_get_groups ();
//groups
$filter_groups_label = '<b>'.__('Group').'</b>';
$filter_groups = html_print_select_groups(false, "AR", true, 'group_id', $group_id, '', '', '', true, false, true, '', false , 'width: auto;');
@ -371,7 +369,10 @@ function mainAgentsModules() {
$filter_groups['id_grupo'] = $group_id;
}
}
$agents = agents_get_agents ($filter_groups);
if (!empty($filter_groups['id_agente'])) {
$agents = agents_get_agents ($filter_groups);
}
$nagents = count($agents);
if ($all_modules == false || $agents == false) {