diff options
author | Philip Häusler <msquare@notrademark.de> | 2015-06-07 20:12:18 +0200 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2015-06-07 20:12:18 +0200 |
commit | eddafead49dc001af0a326855e5a80d17db39b5a (patch) | |
tree | 7c78bb40c2d4cb60424c7541427bd6afaa94a5a6 /includes/model | |
parent | 1da5604f4773322d214cd95f3bb790d6d1f0418b (diff) |
add function to clear log to model
Diffstat (limited to 'includes/model')
-rw-r--r-- | includes/model/LogEntries_model.php | 7 |
1 files changed, 7 insertions, 0 deletions
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`"); +} + ?> |