You are here

function upload_filefield_paths_batch_update in File (Field) Paths 6

Implements hook_filefield_paths_batch_update().

File

modules/upload.inc, line 72
Provides FileField Paths integration with the Upload module.

Code

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

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