summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2012-12-27 02:18:56 +0100
committerPhilip Häusler <msquare@notrademark.de>2012-12-27 02:18:56 +0100
commit26ffee4a96f08aa58a348d11674f6fd29c1498b0 (patch)
tree18fe7f1cd12fb230f9d003786d2f49f24e8e5d14 /includes
parent29a6f020e6a1a8e900239b9855f553e62a00dc26 (diff)
#28 logging doku
Diffstat (limited to 'includes')
-rw-r--r--includes/model/LogEntries_model.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/includes/model/LogEntries_model.php b/includes/model/LogEntries_model.php
index 95ecf6cd..f8a552f2 100644
--- a/includes/model/LogEntries_model.php
+++ b/includes/model/LogEntries_model.php
@@ -11,6 +11,9 @@ function LogEntry_create($nick, $message) {
sql_query("INSERT INTO `LogEntries` SET `timestamp`=" . sql_escape($timestamp) . ", `nick`='" . sql_escape($nick) . "', `message`='" . sql_escape($message) . "'");
}
+/**
+ * Returns log entries of the last 24 hours with maximum count of 1000.
+ */
function LogEntries() {
$log_entries_source = sql_select("SELECT * FROM `LogEntries` WHERE `timestamp` > " . (time() - 24*60*60) . " ORDER BY `timestamp` DESC LIMIT 1000");
return $log_entries_source;