diff options
Diffstat (limited to 'core/helpers')
-rw-r--r-- | core/helpers/core_block.php | 1 | ||||
-rw-r--r-- | core/helpers/core_installer.php | 1 | ||||
-rw-r--r-- | core/helpers/log.php | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/core/helpers/core_block.php b/core/helpers/core_block.php index defde6ce..06354a10 100644 --- a/core/helpers/core_block.php +++ b/core/helpers/core_block.php @@ -55,6 +55,7 @@ class core_block_Core { $block->id = "gLogEntries"; $block->title = _("Log Entries"); $block->content = new View("admin_block_log_entries.html"); + $block->content->entries = ORM::factory("log")->orderby("timestamp", "DESC")->find_all(5); $blocks[] = $block; return implode("\n", $blocks); diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php index 53b5bfe6..87ec3d87 100644 --- a/core/helpers/core_installer.php +++ b/core/helpers/core_installer.php @@ -78,6 +78,7 @@ class core_installer { `severity` int(9) default 0, `timestamp` int(9) default 0, `url` varchar(255) default NULL, + `user_id` int(9) default 0, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); diff --git a/core/helpers/log.php b/core/helpers/log.php index fece9de3..906aa034 100644 --- a/core/helpers/log.php +++ b/core/helpers/log.php @@ -39,6 +39,7 @@ class log_Core { $log->url = url::abs_current(true); $log->referer = request::referrer(null); $log->timestamp = time(); + $log->user_id = user::active()->id; $log->save(); } } |