fix: eventlog type variable collision (#5046)

This commit is contained in:
Tony Murray
2016-11-22 08:27:16 -06:00
committed by Neil Lathwood
parent 2aad2683b9
commit 6708c7cb81
3 changed files with 8 additions and 8 deletions

View File

@@ -22,6 +22,7 @@ var eventlog_grid = $("#eventlog").bootgrid({
return {
id: "eventlog",
device: "' .mres($vars['device']) .'",
eventtype: "' .mres($vars['eventtype']) .'",
};
},
url: "ajax_table.php"

View File

@@ -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 = '<b>'.generate_port_link($this_if, makeshortif(strtolower($this_if['label']))).'</b>';
} else {
$type = $eventlog['type'];
;
}
$response[] = array(