function _comment_upload_delete in Comment Upload 5
Delete files associated with the comment $cid.
Parameters
$cid The comment id of the comment that is deleted.:
1 call to _comment_upload_delete()
- comment_upload_comment in ./
comment_upload.module - Implementation of hook_comment.
File
- ./
comment_upload.module, line 269
Code
function _comment_upload_delete($cid) {
$files = _comment_upload_load_files($cid);
if (!empty($files)) {
foreach ($files as $file) {
file_delete($file->filepath);
db_query('DELETE FROM {comment_upload_files} WHERE fid = %d', $file->fid);
}
}
}