From a883264df96ff30c31b092884e629ab9e1785dc9 Mon Sep 17 00:00:00 2001 From: TheGreatDoc <32565115+TheGreatDoc@users.noreply.github.com> Date: Sat, 4 Aug 2018 22:45:14 +0200 Subject: [PATCH] Fixed Eventlog search (missing OR in SQL query) (#8981) DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [x ] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply `, i.e `./scripts/github-apply 5926` --- html/includes/table/eventlog.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/includes/table/eventlog.inc.php b/html/includes/table/eventlog.inc.php index 71445d4aa0..af35bf7b50 100644 --- a/html/includes/table/eventlog.inc.php +++ b/html/includes/table/eventlog.inc.php @@ -40,7 +40,7 @@ if (Auth::user()->hasGlobalRead()) { } if (isset($searchPhrase) && !empty($searchPhrase)) { - $sql .= " AND (`D`.`hostname` LIKE '%$searchPhrase%' `D`.`sysName` LIKE '%$searchPhrase%' OR `E`.`datetime` LIKE '%$searchPhrase%' OR `E`.`message` LIKE '%$searchPhrase%' OR `E`.`type` LIKE '%$searchPhrase%' OR `E`.`username` LIKE '%$searchPhrase%')"; + $sql .= " AND (`D`.`hostname` LIKE '%$searchPhrase%' OR `D`.`sysName` LIKE '%$searchPhrase%' OR `E`.`datetime` LIKE '%$searchPhrase%' OR `E`.`message` LIKE '%$searchPhrase%' OR `E`.`type` LIKE '%$searchPhrase%' OR `E`.`username` LIKE '%$searchPhrase%')"; } $count_sql = "SELECT COUNT(event_id) $sql";