function upload_filefield_paths_get_fields in File (Field) Paths 6
Same name and namespace in other branches
- 5 modules/upload.inc \upload_filefield_paths_get_fields()
Implements hook_filefield_paths_get_fields().
File
- modules/
upload.inc, line 50 - 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) {
$file = (array) $file;
$ffp['#files'][] = array(
'field' => &$file,
'module' => 'upload',
'name' => 'upload',
'new' => isset($file['new']) ? $file['new'] : FALSE,
);
$ffp['#types']['upload'] = TRUE;
}
}
}
}