You are here

function gallery_assist_delete_items in Gallery Assist 6

Same name and namespace in other branches
  1. 7 gallery_assist_form_BUP.inc \gallery_assist_delete_items()
  2. 7 gallery_assist_form.inc \gallery_assist_delete_items()

Delete all gallery_assist items if the node will be deleted.

Parameters

$file: A object containing the paths to the files should be deleted.

$op: A reserved variable for future options or conditions.

Return value

TRUE if finish.

3 calls to gallery_assist_delete_items()
gallery_assist_delete in ./gallery_assist.module
Implementation of hook_delete().
gallery_assist_delete_one_submit in ./gallery_assist.module
Action: delete a image and all entries from the db.
gallery_assist_save in ./gallery_assist.module
Implementation of hook_save().

File

./gallery_assist.module, line 3349
Drupal content type with gallery functionality.

Code

function gallery_assist_delete_items($file, $op = FALSE) {

  // Delete gallery_assist form thumbnails.
  file_delete($file->thmb_path);

  // Delete thumbnail item.
  file_delete($file->tpath);

  // Delete preview items.
  file_delete($file->ppath);

  // Delete original items.
  file_delete($file->opath);
  return TRUE;
}