This extension/behavior is based on the following Cookbook article: How to log changes of ActiveRecords?.
SystemLog is a behavior that will record every create/update/delete action performed within an ActiveRecord-based model, including whom made the change, and (if the Timestamp behavior is enabled) when the change occurred. (Just a note, while it currently relies on the Timestamp behavior, that is subject to change, as I'll likely just move timestamp handling directly into SystemLog)
Disclaimer: The paragraph below talks about what SystemLog could be used for, but there is no interface built yet for viewing/reverting record changes
What's great about this, is that it should be rather simple to create an interface to display modified records, and the change history of each individual record (with the ability to revert changes). So if an admin becomes overzealous with updating or deleting records, those changes could be reverted easily.
Check out the behavior here:
SystemLog Behavior - http://code.google.c...ents/behaviors/
I still have some changes to make (noted in the @todo), comments to add.
Once it's ready, I'll of course provide the SQL and models that are associated with the behavior.
Any initial thoughts?
Page 1 of 1
ActiveRecord change log behavior
#2
Posted 29 April 2010 - 03:26 AM
Link is not working... I get "google error - not found"
Find more about me.... btw. Do you know your WAN IP?
#3
Posted 29 April 2010 - 03:40 AM
Thx mdomba, turns out the forum is lowercasing the "b" in SystemLogBehavior.php, thus breaking the URL.
URL updated to point to the directory where the file resides, testing fine right now.
URL updated to point to the directory where the file resides, testing fine right now.
Need live Yii support? - Join the #yii IRC channel on Freenode!
#4
Posted 17 August 2013 - 09:35 AM
google code work link: http: // code[dot]google[dot]com/p/cranium-crm/source/browse/private/components/behaviors/SystemLogBehavior.php
Share this topic:
Page 1 of 1