diff options
author | Simon Rettberg | 2014-09-15 17:26:26 +0200 |
---|---|---|
committer | Simon Rettberg | 2014-09-15 17:26:26 +0200 |
commit | 825e994444fcdb73d62710d0d934e93a227bd30f (patch) | |
tree | 4fdf795389ebc9f554b65a89dd8bee1faa1f3c5a /inc/eventlog.inc.php | |
parent | [news-API] tag content as 'content' instead of 'info' (diff) | |
download | slx-admin-825e994444fcdb73d62710d0d934e93a227bd30f.tar.gz slx-admin-825e994444fcdb73d62710d0d934e93a227bd30f.tar.xz slx-admin-825e994444fcdb73d62710d0d934e93a227bd30f.zip |
Added eventlog class, improved db-update machanism.
A warning will be shown in the main menu bar if the database schema needs to be updated.
Diffstat (limited to 'inc/eventlog.inc.php')
-rw-r--r-- | inc/eventlog.inc.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/inc/eventlog.inc.php b/inc/eventlog.inc.php new file mode 100644 index 00000000..0d7f6d4a --- /dev/null +++ b/inc/eventlog.inc.php @@ -0,0 +1,15 @@ +<?php + +class EventLog +{ + + public static function log($eventId, $message) + { + Database::exec("INSERT INTO eventlog (dateline, logtypeid, description)" + . " VALUES (UNIX_TIMESTAMP(), :eventid, :message)", array( + 'eventid' => $eventId, + 'message' => $message + )); + } + +} |