summaryrefslogtreecommitdiffstats
path: root/inc/eventlog.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2014-10-09 16:01:11 +0200
committerSimon Rettberg2014-10-09 16:01:11 +0200
commite1dc0d3c99217504de2ac8467156274786efc0bd (patch)
tree130d7fed1fff8aaaffe5942cf2a3d6bb1dad03c8 /inc/eventlog.inc.php
parentMinor fixes and improvements (diff)
downloadslx-admin-e1dc0d3c99217504de2ac8467156274786efc0bd.tar.gz
slx-admin-e1dc0d3c99217504de2ac8467156274786efc0bd.tar.xz
slx-admin-e1dc0d3c99217504de2ac8467156274786efc0bd.zip
Big load of changes
- Added callback functionality for taskmanager tasks. You can launch a task and define a callback function to be run when the task finished. This requires activating the cronjob - Added cron functionality: Add cronjob that calls the cron api every 5 minutes to use it. (See cron.inc.php) - Added eventlog - Added missing translations - Merged main-menu-login and main-menu-logout
Diffstat (limited to 'inc/eventlog.inc.php')
-rw-r--r--inc/eventlog.inc.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/inc/eventlog.inc.php b/inc/eventlog.inc.php
index dadccdd7..181f8d38 100644
--- a/inc/eventlog.inc.php
+++ b/inc/eventlog.inc.php
@@ -3,28 +3,31 @@
class EventLog
{
- private static function log($type, $message)
+ private static function log($type, $message, $details)
{
- Database::exec("INSERT INTO eventlog (dateline, logtypeid, description)"
- . " VALUES (UNIX_TIMESTAMP(), :type, :message)", array(
+ Database::exec("INSERT INTO eventlog (dateline, logtypeid, description, extra)"
+ . " VALUES (UNIX_TIMESTAMP(), :type, :message, :details)", array(
'type' => $type,
- 'message' => $message
+ 'message' => $message,
+ 'details' => $details
));
}
- public static function failure($message)
+ public static function failure($message, $details = '')
{
- self::log('failure', $message);
+ self::log('failure', $message, $details);
}
- public static function warning($message)
+ public static function warning($message, $details = '')
{
- self::log('warning', $message);
+ self::log('warning', $message, $details);
+ Property::setLastWarningId(Database::lastInsertId());
}
- public static function info($message)
+ public static function info($message, $details = '')
{
- self::log('info', $message);
+ self::log('info', $message, $details);
+ Property::setLastWarningId(Database::lastInsertId());
}
}