You are here

function audio_filefield_paths_batch_update in File (Field) Paths 6

Implements hook_filefield_paths_batch_update().

File

modules/audio.inc, line 69
Provides FileField Paths integration with the Audio module.

Code

function audio_filefield_paths_batch_update($field, $type, &$objects) {
  $result = db_query("SELECT a.nid FROM {audio} a LEFT JOIN {node} n ON a.nid = n.nid WHERE n.type = '%s'", $type);

  // Build array of Node IDs.
  while ($node = db_fetch_object($result)) {
    $objects[] = $node->nid;
  }
}