Closed (fixed)
Project:
Comment Upload
Version:
master
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
10 Oct 2006 at 18:02 UTC
Updated:
31 Jan 2007 at 08:46 UTC
Please add this somewhere in the comment_upload module (I added at line 243). Without it, you'll end up with a lot of "ghost" table entries, should folks delete their forum topics. With the correction to include nid in the file uploads fields (from a previous issue), this is the only area where data is left behind in a delete scenario.
<?php
function comment_upload_nodeapi(&$node, $op) {
#delete upload reference with forum topic
#most of this is taken care of elsewhere
switch ($op) {
case 'delete':
db_query('DELETE FROM {comment_files} WHERE nid = %d', $node->nid);
break;
}
}
?>
Comments
Comment #1
heine commentedThis is not a patch. Code above would leave stray files.
Comment #2
heine commentedFixed in 4.7.x-1.x-dev.
Comment #3
(not verified) commented