#8984 Fixed pagination

This commit is contained in:
Daniel Maya 2022-05-23 17:10:00 +02:00
parent aae68408a1
commit 1379ca43b0
1 changed files with 3 additions and 2 deletions

View File

@ -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,
[