From a5b2b5bba08456ed8a683db734af790b077ca814 Mon Sep 17 00:00:00 2001 From: Petr Macek Date: Tue, 15 Oct 2024 16:17:19 +0200 Subject: [PATCH] fix #701, fix #703 (#705) * fix #701, fix #703 * update --- CHANGELOG.md | 2 ++ notify_lists.php | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5b8b62..f9a67fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ * issue#678: Unable to remove suspended notifications one by one * issue#679: The PHP Mailer does not allow for the to and bcc addresses to be the same * issue#700: PHP8.x issue - addition a non-numeric value +* issue#701: Site filter on notification list doesn't work +* issue#703: Fix sorting column links * feature#677: Allow the Administrator to create a default Single Email Notification Subject * feature#696: Extend email replacement (location, site, ...) for subject and email body diff --git a/notify_lists.php b/notify_lists.php index f9baa26..6b15950 100644 --- a/notify_lists.php +++ b/notify_lists.php @@ -1147,9 +1147,9 @@ function clearFilter() { if (get_request_var('site_id') == '-1') { /* Show all items */ } elseif (get_request_var('site_id') == '0') { - $sql_where .= ($sql_where == '' ? '' : ' AND ') . ' h.site_id = 0'; + $sql_where .= ($sql_where == '' ? 'WHERE' : ' AND ') . ' h.site_id = 0'; } elseif (!isempty_request_var('site_id')) { - $sql_where .= ($sql_where == '' ? '' : ' AND ') . ' h.site_id = ?'; + $sql_where .= ($sql_where == '' ? 'WHERE' : ' AND ') . ' h.site_id = ?'; $sql_params[] = get_request_var('site_id'); } @@ -1253,7 +1253,7 @@ function clearFilter() { ) ); - html_header_sort_checkbox($display_text, get_request_var('sort_column'), get_request_var('sort_direction'), false); + html_header_sort_checkbox($display_text, get_request_var('sort_column'), get_request_var('sort_direction'), false, 'notify_lists.php?action=edit&id=' . get_filter_request_var('id')); if (cacti_sizeof($hosts)) { foreach ($hosts as $host) {