aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/system_log.php7
-rw-r--r--engine/schema/mysql.sql3
-rw-r--r--engine/schema/upgrades/2008101701.sql7
-rw-r--r--version.php2
4 files changed, 17 insertions, 2 deletions
diff --git a/engine/lib/system_log.php b/engine/lib/system_log.php
index 1bbde9231..4e862791d 100644
--- a/engine/lib/system_log.php
+++ b/engine/lib/system_log.php
@@ -212,10 +212,15 @@
$enabled = $object->enabled;
else
$enabled = 'yes';
+
+ if (isset($object->owner_guid))
+ $owner_guid = $object->owner_guid;
+ else
+ $owner_guid = 0;
// Create log if we haven't already created it
if (!isset($logcache[$time][$object_id][$event])) {
- if (insert_data("INSERT DELAYED into {$CONFIG->dbprefix}system_log (object_id, object_class, object_type, object_subtype, event, performed_by_guid, access_id, enabled, time_created) VALUES ('$object_id','$object_class','$object_type', '$object_subtype', '$event',$performed_by, $access_id, '$enabled', '$time')")) {
+ if (insert_data("INSERT DELAYED into {$CONFIG->dbprefix}system_log (object_id, object_class, object_type, object_subtype, event, performed_by_guid, owner_guid, access_id, enabled, time_created) VALUES ('$object_id','$object_class','$object_type', '$object_subtype', '$event',$performed_by, $owner_guid, $access_id, '$enabled', '$time')")) {
$logcache[$time][$object_id][$event] = true;
return true;
}
diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql
index 35c079004..bb8646858 100644
--- a/engine/schema/mysql.sql
+++ b/engine/schema/mysql.sql
@@ -290,8 +290,11 @@ CREATE TABLE `prefix_system_log` (
`event` varchar(50) NOT NULL,
`performed_by_guid` int(11) NOT NULL,
+ `owner_guid` int(11) NOT NULL,
`access_id` int(11) NOT NULL,
+ `enabled` enum ('yes', 'no') NOT NULL default 'yes',
+
`time_created` int(11) NOT NULL,
PRIMARY KEY (`id`),
diff --git a/engine/schema/upgrades/2008101701.sql b/engine/schema/upgrades/2008101701.sql
new file mode 100644
index 000000000..3e6fc9653
--- /dev/null
+++ b/engine/schema/upgrades/2008101701.sql
@@ -0,0 +1,7 @@
+ALTER TABLE `prefix_system_log` ADD COLUMN `owner_guid` int(11) NOT NULL AFTER `performed_by_guid`;
+
+ALTER TABLE `prefix_system_log` DROP KEY `owner_guid`;
+ALTER TABLE `prefix_system_log` ADD KEY `owner_guid` (`owner_guid`);
+
+ALTER TABLE `prefix_system_log` DROP KEY `river_key`;
+ALTER TABLE `prefix_system_log` ADD KEY `river_key` (`object_type`, `object_subtype`, `event`, `access_id`);
diff --git a/version.php b/version.php
index 38e5d01a7..0ab5ce35e 100644
--- a/version.php
+++ b/version.php
@@ -13,7 +13,7 @@
* @link http://elgg.org/
*/
- $version = 2008101601; // YYYYMMDD = Elgg Date
+ $version = 2008101701; // YYYYMMDD = Elgg Date
// XX = Interim incrementer
$release = '1.09'; // Human-friendly version name