From c600a928543ee98fecc73461f4f82314ac408d29 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Fri, 27 Mar 2020 12:31:49 -0400 Subject: [PATCH] Fixing Issue #120 and other minor * SQL syntax error for syslog when click browser back button * Fixing some row spacing issue on log tab. --- README.md | 2 ++ functions.php | 2 +- syslog.php | 14 ++++++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a3658e1..33eb99f 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,8 @@ that. --- develop --- +* issue#120: SQL syntax error for syslog when click browser back button + * issue: Syslog stats not reporting properly * issue: Internationalization issues on console diff --git a/functions.php b/functions.php index a83384f..31c2947 100644 --- a/functions.php +++ b/functions.php @@ -530,7 +530,7 @@ function syslog_log_row_color($severity, $tip_title) { break; } - print "\n"; + print "\n"; } /** function syslog_row_color() diff --git a/syslog.php b/syslog.php index 34435e1..c2fa701 100644 --- a/syslog.php +++ b/syslog.php @@ -303,10 +303,13 @@ function syslog_statistics() { } if (cacti_sizeof($records)) { + $i = 0; + foreach ($records as $r) { $time = date($date_format, strtotime($r['insert_time'])); - form_alternate_row(); + form_alternate_row('line' . $i); + print '' . (get_request_var('host') != '-2' ? $r['host']:'-') . ''; print '' . (get_request_var('facility') != '-2' ? ucfirst($r['facility']):'-') . ''; print '' . (get_request_var('priority') != '-2' ? ucfirst($r['priority']):'-') . ''; @@ -314,7 +317,10 @@ function syslog_statistics() { //print '' . $r['insert_time'] . ''; print '' . $time . ''; print '' . number_format_i18n($r['records'], -1) . ''; + form_end_row(); + + $i++; } } else { print "" . __('No Syslog Statistics Found', 'syslog') . ""; @@ -1159,13 +1165,13 @@ function exportRecords() { } function clearFilter() { - strURL = 'syslog.php?header=false&clear=true'; - + strURL = 'syslog.php?tab=' + pageTab; + strURL += '&header=false&clear=true'; loadPageNoHeader(strURL); } function saveSettings() { - strURL = 'syslog.php?action=save'; + strURL = 'syslog.php?action=save&tab=' + pageTab; strURL += '&trimval='+$('#trimval').val(); strURL += '&rows='+$('#rows').val(); strURL += '&removal='+$('#removal').val();