You are here

function comment_upload_filefield_paths_batch_update in File (Field) Paths 6

Implements hook_filefield_paths_batch_update().

File

modules/comment_upload.inc, line 68
Provides FileField Paths integration with the Comment Upload module.

Code

function comment_upload_filefield_paths_batch_update($field, $type, &$objects) {
  $result = db_query("SELECT DISTINCT(cu.cid) FROM {comment_upload} cu LEFT JOIN {node} n\n    ON cu.nid = n.nid WHERE n.type = '%s'", $type);

  // Build array of Comment IDs.
  while ($comment = db_fetch_object($result)) {
    $objects[] = $comment->cid;
  }
}