fix filter events sounds pandora_enterprise#10188

This commit is contained in:
daniel 2023-01-27 12:41:06 +01:00
parent 3f000f403a
commit 81ae7fdb08
2 changed files with 31 additions and 1 deletions

View File

@ -2493,6 +2493,37 @@ if ($get_events_fired) {
$filter = events_get_event_filter($filter_id);
}
if (is_metaconsole() === true) {
$servers = metaconsole_get_servers();
if (is_array($servers) === true) {
$servers = array_reduce(
$servers,
function ($carry, $item) {
$carry[$item['id']] = $item['server_name'];
return $carry;
}
);
} else {
$servers = [];
}
if ($filter['server_id'] === '') {
$filter['server_id'] = array_keys($servers);
} else {
if (is_array($filter['server_id']) === false) {
if (is_numeric($filter['server_id']) === true) {
if ($filter['server_id'] !== 0) {
$filter['server_id'] = [$filter['server_id']];
} else {
$filter['server_id'] = array_keys($servers);
}
} else {
$filter['server_id'] = explode(',', $filter['server_id']);
}
}
}
}
// Set time.
$filter['event_view_hr'] = 0;

View File

@ -4948,7 +4948,6 @@ function events_page_general_acknowledged($event_id)
global $config;
$Acknowledged = '';
$event = db_get_row('tevento', 'id_evento', $event_id);
hd($event['ack_utimestamp'], true);
if ($event !== false && $event['estado'] == 1) {
$user_ack = db_get_value(
'fullname',