You are here

function revision_scheduler_field_attach_delete_revision in Revision scheduler 7

Implements hook_field_attach_delete_revision().

File

./revision_scheduler.module, line 205

Code

function revision_scheduler_field_attach_delete_revision($entity_type, $entity) {

  // Delete the entity's revision from the revision_scheduler table.
  list($entity_id, $revision_id) = entity_extract_ids($entity_type, $entity);
  db_delete('revision_scheduler')
    ->condition('entity_type', $entity_type)
    ->condition('entity_id', $entity_id)
    ->condition('revision_id', $revision_id)
    ->condition('time_executed', 0)
    ->execute();
}