You are here

function video_file_delete in Video 7.2

Same name and namespace in other branches
  1. 6.5 video.module \video_file_delete()
  2. 6.4 video.module \video_file_delete()
  3. 7 video.module \video_file_delete()

Implements hook_file_delete().

@todo: delete more

File

./video.module, line 317
All module hooks implementation can be found in this file.

Code

function video_file_delete(stdClass $file) {

  // Deregister the file in video_queue
  db_delete('video_queue')
    ->condition('fid', $file->fid)
    ->execute();

  // Deregister the thumbnails in video_thumbnails
  db_delete('video_thumbnails')
    ->condition('thumbnailfid', $file->fid)
    ->execute();
  db_delete('video_thumbnails')
    ->condition('videofid', $file->fid)
    ->execute();

  // Deregister the converted files in video_output
  db_delete('video_output')
    ->condition('output_fid', $file->fid)
    ->execute();
  db_delete('video_output')
    ->condition('original_fid', $file->fid)
    ->execute();
}