You are here

function filefield_field_delete_revision in FileField 6.3

Implementation of CCK's hook_field($op = 'delete_revision').

File

./filefield_field.inc, line 208
FileField CCK field hooks and callbacks.

Code

function filefield_field_delete_revision($node, $field, &$items, $teaser, $page) {
  foreach ($items as $delta => $item) {
    if (isset($item['fid'])) {

      // For hook_file_references, remember that this is being deleted.
      $item['field_name'] = $field['field_name'];
      $item['delete_vid'] = $node->vid;
      if (filefield_field_delete_file($item, $field)) {
        $items[$delta] = NULL;
      }
    }
  }
}