You are here

function imagecrop_file_delete in Image javascript crop 6

Same name and namespace in other branches
  1. 7 imagecrop.module \imagecrop_file_delete()

Implementation of filefield.module's hook_file_delete().

Remove imagecrop settings + temp files after a file has been deleted.

File

./imagecrop.module, line 162
Provides a javascript toolbox through an imagecache action.

Code

function imagecrop_file_delete($file) {
  db_query("DELETE FROM {imagecrop} WHERE fid = %d", $file->fid);
  file_delete(imagecache_create_path('_imagecrop_temp', $file->filepath));
}