diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-05 16:48:49 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-05 16:48:49 +0000 |
commit | 4228ff7b7557b8cb96ef9d92bd66748480e6fd57 (patch) | |
tree | 453ea2a94311d29487fe3667ccd3e4e882fe55d8 | |
parent | a7df126335728fc25e9dfd591e970ce9effa957f (diff) | |
download | elgg-4228ff7b7557b8cb96ef9d92bd66748480e6fd57.tar.gz elgg-4228ff7b7557b8cb96ef9d92bd66748480e6fd57.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* System log performs the id of the user who performed a given action (or 0 if no user was logged in). Update your DB schema.
git-svn-id: https://code.elgg.org/elgg/trunk@814 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/system_log.php | 3 | ||||
-rw-r--r-- | engine/schema/mysql.sql | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/engine/lib/system_log.php b/engine/lib/system_log.php index f830d6a05..fbb9f9d96 100644 --- a/engine/lib/system_log.php +++ b/engine/lib/system_log.php @@ -101,9 +101,10 @@ $object_class = $object->getClassName(); $event = sanitise_string($event); $time = time(); + $performed_by = (int)$_SESSION['guid']; // Create log - return insert_data("INSERT into {$CONFIG->dbprefix}system_log (object_id, object_class, event, time_created) VALUES ('$object_id','$object_class','$event', '$time')"); + return insert_data("INSERT into {$CONFIG->dbprefix}system_log (object_id, object_class, event, performed_by_guid, time_created) VALUES ('$object_id','$object_class','$event',$performed_by, '$time')"); } } diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql index 874720f3d..a4c4ddc61 100644 --- a/engine/schema/mysql.sql +++ b/engine/schema/mysql.sql @@ -242,6 +242,7 @@ CREATE TABLE `prefix_system_log` ( `object_class` varchar(128) NOT NULL,
`event` varchar(128) NOT NULL,
+ `performed_by_guid` int(11) NOT NULL,
`time_created` int(11) NOT NULL,
|