- improved signature "updated" timestamp used in combination with the signature reader, closed #436

This commit is contained in:
Mark Friedrich
2018-09-06 20:23:25 +02:00
parent e9285a3157
commit f25b22dc60

View File

@@ -241,6 +241,22 @@ class SystemSignatureModel extends AbstractMapTrackingModel {
$self->logActivity('signatureCreate');
}
/**
* Event "Hook" function
* can be overwritten
* return false will stop any further action
* @param self $self
* @param $pkeys
* @return bool
*/
public function beforeUpdateEvent($self, $pkeys){
// "updated" column should always be updated if no changes made this signature
// -> makes it easier to see what signatures have not been updated
$this->touch('updated');
return parent::beforeUpdateEvent($self, $pkeys);
}
/**
* Event "Hook" function
* return false will stop any further action
@@ -278,6 +294,7 @@ class SystemSignatureModel extends AbstractMapTrackingModel {
* @param null $table
* @param null $fields
* @return bool
* @throws \Exception
*/
public static function setup($db=null, $table=null, $fields=null){
$status = parent::setup($db,$table,$fields);