You are here

function comment_upload_comment_delete in Comment Upload 6

Remove files when the comment is deleted.

Parameters

object $comment:

1 call to comment_upload_comment_delete()
comment_upload_comment in ./comment_upload.module
Implementation of hook_comment().

File

./comment_upload.module, line 361
Provides file attachment functionality for comments.

Code

function comment_upload_comment_delete($comment) {
  $files = comment_upload_load_files($comment->cid);
  if (!empty($files)) {
    foreach ($files as $fid => $file) {
      comment_upload_delete_file($file);
    }
  }
}