From b16c272a6a4d0e24576cb02f128a07605d5dd731 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 6 Oct 2014 19:28:27 +0200 Subject: use eventlog when creating users; show info on main page if no user was created yet --- inc/eventlog.inc.php | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'inc/eventlog.inc.php') 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); + } + } -- cgit v1.2.3-55-g7522