diff options
author | msquare <msquare@notrademark.de> | 2016-09-30 18:49:33 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2016-09-30 18:49:33 +0200 |
commit | 6dfefc3bb9f054c472156801e37300059444ecc7 (patch) | |
tree | 1917fda87003323126b8d7312b3f54b31f27dee0 /includes/model/LogEntries_model.php | |
parent | b87eb49b9324a56da723804e088415d52df77d77 (diff) |
small code improvements
Diffstat (limited to 'includes/model/LogEntries_model.php')
-rw-r--r-- | includes/model/LogEntries_model.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/includes/model/LogEntries_model.php b/includes/model/LogEntries_model.php index 8b7f65a0..09bd03dc 100644 --- a/includes/model/LogEntries_model.php +++ b/includes/model/LogEntries_model.php @@ -22,6 +22,9 @@ function LogEntries() { * Returns log entries filtered by a keyword */ function LogEntries_filter($keyword) { + if ($keyword == "") { + return LogEntries(); + } return sql_select("SELECT * FROM `LogEntries` WHERE `nick` LIKE '%" . sql_escape($keyword) . "%' OR `message` LIKE '%" . sql_escape($keyword) . "%' ORDER BY `timestamp` DESC"); } |