function _linkimagefield_file_delete in Link Image Field 5
2 calls to _linkimagefield_file_delete()
- linkimagefield_field in ./
linkimagefield.module - Implementation of hook_field().
- linkimagefield_file_update in ./
linkimagefield.module - update the file record if necessary
File
- ./
linkimagefield.module, line 352 - Defines an link image field type. linkimagefield uses content.module to store the fid, and the drupal files table to store the actual file data.
Code
function _linkimagefield_file_delete($file, $fieldname) {
if (is_numeric($file['fid'])) {
db_query('DELETE FROM {files} WHERE fid = %d', $file['fid']);
}
else {
unset($_SESSION['linkimagefield'][$fieldname][$file['sessionid']]);
}
return file_delete($file['filepath']);
}