add function to clear log to model
This commit is contained in:
parent
1da5604f47
commit
eddafead49
|
@ -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");
|
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`");
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue