aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorolav%bkor.dhs.org <>2007-01-21 23:11:52 +0000
committerolav%bkor.dhs.org <>2007-01-21 23:11:52 +0000
commite7030bab0806220d6644073a5d91ec4620131f21 (patch)
treeb6341025af746c1f700ee5b6cb5d8747b240242b /attachment.cgi
parentBug 365247: New UI for the attachment table (ported from b.m.o) - Patch by Fr... (diff)
downloadbugzilla-e7030bab0806220d6644073a5d91ec4620131f21.tar.gz
bugzilla-e7030bab0806220d6644073a5d91ec4620131f21.tar.bz2
bugzilla-e7030bab0806220d6644073a5d91ec4620131f21.zip
Bug 367649: Deleting an attachment should set isobsolete to 1
Patch by Olav Vitters <olav@bkor.dhs.org> r=LpSolit a=LpSolit
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi6
1 files changed, 4 insertions, 2 deletions
diff --git a/attachment.cgi b/attachment.cgi
index 7c3605bfd..578adfac0 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -804,8 +804,10 @@ sub delete_attachment {
$dbh->bz_lock_tables('attachments WRITE', 'attach_data WRITE', 'flags WRITE');
$dbh->do('DELETE FROM attach_data WHERE id = ?', undef, $attach_id);
- $dbh->do('UPDATE attachments SET mimetype = ?, ispatch = ?, isurl = ?
- WHERE attach_id = ?', undef, ('text/plain', 0, 0, $attach_id));
+ $dbh->do('UPDATE attachments SET mimetype = ?, ispatch = ?, isurl = ?,
+ isobsolete = ?
+ WHERE attach_id = ?', undef,
+ ('text/plain', 0, 0, 1, $attach_id));
$dbh->do('DELETE FROM flags WHERE attach_id = ?', undef, $attach_id);
$dbh->bz_unlock_tables;