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.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/model/LogEntries_model.php b/includes/model/LogEntries_model.php
index 49e063dc..2e8a8cf7 100644
--- a/includes/model/LogEntries_model.php
+++ b/includes/model/LogEntries_model.php
@@ -18,4 +18,11 @@ function LogEntries() {
return sql_select("SELECT * FROM `LogEntries` ORDER BY `timestamp` DESC LIMIT 10000");
}
-?> \ No newline at end of file
+/**
+ * Returns log entries filtered by a keyword
+ */
+function LogEntries_filter($keyword) {
+ return sql_select("SELECT * FROM `LogEntries` WHERE `nick` LIKE '%" . sql_escape($keyword) . "%' OR `message` LIKE '%" . sql_escape($keyword) . "%' ORDER BY `timestamp` DESC");
+}
+
+?>