You are here

function certificate_certificate_presave in Certificate 7.3

Same name and namespace in other branches
  1. 8.3 certificate.module \certificate_certificate_presave()

Implements hook_entity_presave().

Set this newly saved revision as the active revision.

File

./certificate.module, line 922
Certificate module.

Code

function certificate_certificate_presave($entity) {
  if (!isset($entity->created)) {
    $entity->created = REQUEST_TIME;
  }
  $entity->changed = REQUEST_TIME;
  $entity->is_new_revision = TRUE;
  $entity->default_revision = TRUE;
}