Yii Framework Forum: [ Extension] Audittrail 2 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[ Extension] Audittrail 2 Rate Topic: -----

#1 User is offline   Sammaye 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 110
  • Joined: 24-June 11

Posted 15 February 2013 - 07:13 AM

This is designed for discussion about the AuditTrail 2 extension here: http://www.yiiframew...on/audittrail2/

Please note you can also file an issue on Github here: https://github.com/S...sues?state=open
0

#2 User is offline   Slivicon 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 14-February 13

Posted 27 February 2013 - 12:39 PM

This is a DBMS issue, but it came up when I used this extension as the Loggable Behavior, when configured to use timestamps, attempts to use the PHP function time(). In my situation with MySQL, the DBMS was not accepting an integer value for timestamp, even after changing the 'stamp' field from datetime to timestamp.

http://www.yiiframew...save-timestamp/

Edit: This may only occur when changing the stamp field datatype to timestamp from datetime.

Also, for those that may be interested, I chose to attach the core Timestamp behavior to the AuditTrail model and comment out the $log->stamp setting in LoggableBehavior:

//AuditTrail.php
public function behaviors() {
  return array(
    'CTimestampBehavior' => array(
      'class' => 'zii.behaviors.CTimestampBehavior',
        'createAttribute' => 'stamp',
        'updateAttribute' => 'stamp',
        'setUpdateOnCreate' => true
    )
  );
}
//LoggableBehavior.php
//$log->stamp = $this->storeTimestamp ? time() : date($this->dateFormat);

0

#3 User is offline   Shelby Hill 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 03-April 13

Posted 19 April 2013 - 09:30 AM

I really need to extend this to logging of certain searches? I see there is an after find already setup. Anybody have a good idea how to make it log the criteria that was used? Is that even possible?
0

#4 User is offline   cappadochian 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 150
  • Joined: 02-January 11

Posted 23 April 2013 - 08:27 AM

hi,

nice extension! is it possible to log ALL actions, not only update-create-delete, but read also? in fact, ALL actions? login, admin, view etc? UPDATE: in the meanwhile I've figured it out how to adapt this to login (in fact it logs lastvisit value change).

it would be a nice feature if we could define certain actions to be affected by AuditTrail behaviour. for example:
'on' => array('view', 'create', 'update'),

by the way, where can I find AuditLog model?
thanks a lot!

BR
c
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users