diff options
author | Simon Rettberg | 2014-10-06 19:28:27 +0200 |
---|---|---|
committer | Simon Rettberg | 2014-10-06 19:28:27 +0200 |
commit | b16c272a6a4d0e24576cb02f128a07605d5dd731 (patch) | |
tree | 6a6fef614e0a6a451761c0e18005ee664f988110 /inc | |
parent | Implement force utf8 option for mysql db (diff) | |
download | slx-admin-b16c272a6a4d0e24576cb02f128a07605d5dd731.tar.gz slx-admin-b16c272a6a4d0e24576cb02f128a07605d5dd731.tar.xz slx-admin-b16c272a6a4d0e24576cb02f128a07605d5dd731.zip |
use eventlog when creating users; show info on main page if no user was created yet
Diffstat (limited to 'inc')
-rw-r--r-- | inc/eventlog.inc.php | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/inc/eventlog.inc.php b/inc/eventlog.inc.php index 0d7f6d4a..dadccdd7 100644 --- a/inc/eventlog.inc.php +++ b/inc/eventlog.inc.php @@ -2,14 +2,29 @@ class EventLog { - - public static function log($eventId, $message) + + private static function log($type, $message) { Database::exec("INSERT INTO eventlog (dateline, logtypeid, description)" - . " VALUES (UNIX_TIMESTAMP(), :eventid, :message)", array( - 'eventid' => $eventId, + . " VALUES (UNIX_TIMESTAMP(), :type, :message)", array( + 'type' => $type, 'message' => $message )); } + public static function failure($message) + { + self::log('failure', $message); + } + + public static function warning($message) + { + self::log('warning', $message); + } + + public static function info($message) + { + self::log('info', $message); + } + } |