From eddafead49dc001af0a326855e5a80d17db39b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Sun, 7 Jun 2015 20:12:18 +0200 Subject: [PATCH] add function to clear log to model --- includes/model/LogEntries_model.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/model/LogEntries_model.php b/includes/model/LogEntries_model.php index d13c3692..45ef9f8c 100644 --- a/includes/model/LogEntries_model.php +++ b/includes/model/LogEntries_model.php @@ -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`"); +} + ?>