| 1005 |
} |
} |
| 1006 |
$field = content_fields($field_name, $node_type); // Get array of info about the field. |
$field = content_fields($field_name, $node_type); // Get array of info about the field. |
| 1007 |
$filefield_path = $field['widget']['file_path']; // Get the specific file path that was set for the field. |
$filefield_path = $field['widget']['file_path']; // Get the specific file path that was set for the field. |
| 1008 |
|
// If they have Token module installed, search the $filefield_path for tokens and get them replaced. |
| 1009 |
|
if (module_exists('token')) { |
| 1010 |
|
$filefield_path = token_replace($filefield_path, 'user', $account); |
| 1011 |
|
} |
| 1012 |
$newfile->filepath = file_directory_path() .'/'. $filefield_path .'/'. $newfile->filename; |
$newfile->filepath = file_directory_path() .'/'. $filefield_path .'/'. $newfile->filename; |
| 1013 |
} |
} |
| 1014 |
|
|