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 d13c3692..8b7f65a0 100644
--- a/includes/model/LogEntries_model.php
+++ b/includes/model/LogEntries_model.php
@@ -12,7 +12,7 @@ function LogEntry_create($nick, $message) {
}
/**
- * Returns log entries of the last 24 hours with maximum count of 1000.
+ * Returns log entries with maximum count of 10000.
*/
function LogEntries() {
return sql_select("SELECT * FROM `LogEntries` ORDER BY `timestamp` DESC LIMIT 10000");
@@ -25,4 +25,11 @@ 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");
}
+/**
+ * Delete all log entries.
+ */
+function LogEntries_clear_all() {
+ return sql_query("TRUNCATE `LogEntries`");
+}
+
?>