function pdf_to_imagefield_empty_filefield in PDF to ImageField 6.2
Same name and namespace in other branches
- 7 pdf_to_imagefield.module \pdf_to_imagefield_empty_filefield()
Utility to check if a nodes field array is really empty.
Dunno why, but cck keep saving useless placeholders, field is not truly empty, but contains an 'empty' item.
Return value
if the array is effectively empty or not
2 calls to pdf_to_imagefield_empty_filefield()
- pdf_to_imagefield_node_insert in ./
pdf_to_imagefield.module - hook_node_insert() nodapi subroutine
- pdf_to_imagefield_node_presave in ./
pdf_to_imagefield.module - hook_node_presave() nodapi subroutine
File
- ./
pdf_to_imagefield.module, line 476 - PDF to ImageField core hooks and menu callbacks.
Code
function pdf_to_imagefield_empty_filefield($field_array) {
foreach ($field_array as $i => $f) {
if (!empty($f['fid'])) {
return FALSE;
}
}
return TRUE;
}