From 6708c7cb8127035e48fbd5e9684daa901c744fc4 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Tue, 22 Nov 2016 08:27:16 -0600 Subject: [PATCH] fix: eventlog type variable collision (#5046) --- html/includes/common/eventlog.inc.php | 1 + html/includes/table/eventlog.inc.php | 5 ++--- html/pages/eventlog.inc.php | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/html/includes/common/eventlog.inc.php b/html/includes/common/eventlog.inc.php index 4db5bdb18e..4335fccc74 100644 --- a/html/includes/common/eventlog.inc.php +++ b/html/includes/common/eventlog.inc.php @@ -22,6 +22,7 @@ var eventlog_grid = $("#eventlog").bootgrid({ return { id: "eventlog", device: "' .mres($vars['device']) .'", + eventtype: "' .mres($vars['eventtype']) .'", }; }, url: "ajax_table.php" diff --git a/html/includes/table/eventlog.inc.php b/html/includes/table/eventlog.inc.php index be8feaf4c1..e842fc980c 100644 --- a/html/includes/table/eventlog.inc.php +++ b/html/includes/table/eventlog.inc.php @@ -7,9 +7,9 @@ if (is_numeric($_POST['device'])) { $param[] = $_POST['device']; } -if (!empty($_POST['type'])) { +if (!empty($_POST['eventtype'])) { $where .= ' AND `E`.`type` = ?'; - $param[] = $_POST['type']; + $param[] = $_POST['eventtype']; } if ($_POST['string']) { @@ -58,7 +58,6 @@ foreach (dbFetchRows($sql, $param) as $eventlog) { $type = ''.generate_port_link($this_if, makeshortif(strtolower($this_if['label']))).''; } else { $type = $eventlog['type']; - ; } $response[] = array( diff --git a/html/pages/eventlog.inc.php b/html/pages/eventlog.inc.php index ca0942ebb7..49131f065f 100644 --- a/html/pages/eventlog.inc.php +++ b/html/pages/eventlog.inc.php @@ -41,16 +41,16 @@ print_optionbar_start(); - '.$types['type'].''; + echo ">$type"; } ?>