From 1379ca43b0f33091ebf122b70696f8d81547594a Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 23 May 2022 17:10:00 +0200 Subject: [PATCH] #8984 Fixed pagination --- pandora_console/godmode/alerts/alert_templates.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/alerts/alert_templates.php b/pandora_console/godmode/alerts/alert_templates.php index 4833ef8b55..17f281571c 100644 --- a/pandora_console/godmode/alerts/alert_templates.php +++ b/pandora_console/godmode/alerts/alert_templates.php @@ -352,14 +352,15 @@ if ($search_string) { $filter[] = "(name LIKE '%".$search_string."%' OR description LIKE '%".$search_string."%' OR value LIKE '%".$search_string."%')"; } -$total_templates = alerts_get_alert_templates($filter, ['COUNT(*) AS total']); -$total_templates = $total_templates[0]['total']; $filter['offset'] = (int) get_parameter('offset'); $filter['limit'] = (int) $config['block_size']; if (!is_user_admin($config['id_user'])) { $filter['id_group'] = array_keys(users_get_groups(false, 'LM')); } +$total_templates = alerts_get_alert_templates($filter, ['COUNT(*) AS total']); +$total_templates = $total_templates[0]['total']; + $templates = alerts_get_alert_templates( $filter, [