minor fixes

This commit is contained in:
alejandro.campos@artica.es 2021-06-02 19:02:25 +02:00
parent 84905a6579
commit 36eb084824
2 changed files with 5 additions and 5 deletions

View File

@ -3144,7 +3144,7 @@ $class = 'databox filters';
'agent_os_filter[]',
$selected_agent_os_filter,
'',
'All',
__('All'),
'0',
false,
true
@ -3198,8 +3198,8 @@ $class = 'databox filters';
'agent_status_filter[]',
$selected_agent_status_filter,
'',
false,
'',
__('All'),
'-1',
false,
true,
false,

View File

@ -2297,7 +2297,7 @@ function reporting_agents_inventory($report, $content)
$search_sql .= ' AND id_os = '.$es_custom_fields;
}
if ($es_os_filter != '') {
if (in_array('0', $es_os_filter) === false) {
$search_sql .= ' AND id_os IN ('.implode(',', $es_os_filter).')';
}
@ -2394,7 +2394,7 @@ function reporting_agents_inventory($report, $content)
}
if (array_search('estado', $es_agents_inventory_display_options) !== false) {
if (in_array(agents_get_status($value['id_agente']), $es_agent_status_filter)) {
if (in_array('-1', $es_agent_status_filter) === true || in_array(agents_get_status($value['id_agente']), $es_agent_status_filter)) {
$agents[$key]['estado'] = agents_get_status($value['id_agente']);
} else {
// Agent does not match status filter.