You are here

function upload_filefield_paths_update in File (Field) Paths 6

Same name and namespace in other branches
  1. 5 modules/upload.inc \upload_filefield_paths_update()

Implements hook_filefield_paths_update().

File

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

Code

function upload_filefield_paths_update($oid, $field) {
  $node = node_load($oid);

  // Flag files for update.
  if (isset($node->files)) {
    foreach ($node->files as &$file) {
      $file->new = TRUE;
    }
  }

  // Set Form ID.
  $node->form_id = $node->type . '_node_form';

  // Process Node.
  filefield_paths_nodeapi($node, 'update', NULL, NULL);
}