summaryrefslogtreecommitdiffstats
path: root/filefield_file.inc
blob: 6beceed6c59d84bd1d2db60d4ea0ca42c888f2be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

/**
 * @file
 * FileField hook_file callbacks.
 */

function filefield_file_references($file) {
  $references = 0;
  foreach(content_fields() as $field) {
    if ($field['type'] != 'file') {
      continue;
    }
    $references += field_file_references($file, $field);
  }
  return array('filefield' => $references);
}

function filefield_file_delete($file) {
  // foreach  field... remove items referencing $file.
}