summaryrefslogtreecommitdiff
path: root/includes/model/LogEntries_model.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/model/LogEntries_model.php')
-rw-r--r--includes/model/LogEntries_model.php3
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");
}