You are here

function _emthumb_file_delete in Embedded Media Field 5

Same name and namespace in other branches
  1. 6.3 contrib/emthumb/emthumb.module \_emthumb_file_delete()
  2. 6 contrib/emthumb/emthumb.module \_emthumb_file_delete()
  3. 6.2 contrib/emthumb/emthumb.module \_emthumb_file_delete()
2 calls to _emthumb_file_delete()
emthumb_emfield_field_extra in contrib/emthumb/emthumb.module
emthumb_file_update in contrib/emthumb/emthumb.module
update the file record if necessary

File

contrib/emthumb/emthumb.module, line 466

Code

function _emthumb_file_delete($file, $fieldname) {
  if (is_numeric($file['fid'])) {
    db_query('DELETE FROM {files} WHERE fid = %d', $file['fid']);
  }
  else {
    unset($_SESSION['emthumb'][$fieldname][$file['sessionid']]);
  }
  return file_delete($file['filepath']);
}