function filefield_content_is_empty in FileField 6.3
Same name and namespace in other branches
- 6.2 filefield.module \filefield_content_is_empty()
Implementation of CCK's hook_content_is_empty().
The result of this determines whether content.module will save the value of the field. Note that content module has some interesting behaviors for empty values. It will always save at least one record for every node revision, even if the values are all NULL. If it is a multi-value field with an explicit limit, CCK will save that number of empty entries.
File
- ./
filefield.module, line 391 - FileField: Defines a CCK file field type.
Code
function filefield_content_is_empty($item, $field) {
return empty($item['fid']) || (int) $item['fid'] == 0;
}