You are here

protected function CRMCoreContactController::saveRevision in CRM Core 7

Update contact object before saving revision.

Overrides EntityAPIController::saveRevision

File

modules/crm_core_contact/includes/crm_core_contact.controller.inc, line 91
Controller class for contacts.

Class

CRMCoreContactController
@file Controller class for contacts.

Code

protected function saveRevision($entity) {
  if (!isset($entity->log)) {
    $entity->log = '';
  }
  $entity->is_new_revision = TRUE;
  $entity->uid = $GLOBALS['user']->uid;
  return parent::saveRevision($entity);
}