function upload_filefield_paths_get_fields in File (Field) Paths 5
Same name and namespace in other branches
- 6 modules/upload.inc \upload_filefield_paths_get_fields()
Implementation of hook_filefield_paths_get_fields().
File
- modules/
upload.inc, line 51 - Provides FileField Paths integration with the Upload module.
Code
function upload_filefield_paths_get_fields(&$node, &$ffp) {
if (is_object($node) && !isset($node->cid)) {
if (isset($node->files)) {
foreach ($node->files as &$file) {
$ffp['#files'][] = array(
'field' => &$file,
'module' => 'upload',
'name' => 'upload',
'new' => is_object($file),
);
$ffp['#types']['upload'] = TRUE;
}
}
}
}