summaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
authorbbaetz%student.usyd.edu.au <>2002-08-14 22:42:28 +0200
committerbbaetz%student.usyd.edu.au <>2002-08-14 22:42:28 +0200
commitdcb07b50e043893ff849b16890f9ea3c6aadc647 (patch)
tree46032c7f7e661cf9ede3faf83bc736bffad16a5e /attachment.cgi
parent0c535b34a908839bdad2009c44d63b993d51b935 (diff)
downloadbugzilla-dcb07b50e043893ff849b16890f9ea3c6aadc647.tar.gz
bugzilla-dcb07b50e043893ff849b16890f9ea3c6aadc647.tar.xz
Bug 153578 - Attachment modified date is meant to be attachment creation
date r=preed, joel
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi12
1 files changed, 3 insertions, 9 deletions
diff --git a/attachment.cgi b/attachment.cgi
index 8a6c1b033..5614549e4 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -382,11 +382,6 @@ sub viewall
($a{'attachid'}, $a{'date'}, $a{'contenttype'},
$a{'description'}, $a{'ispatch'}, $a{'isobsolete'}) = FetchSQLData();
- # Format the attachment's creation/modification date into something readable.
- if ($a{'date'} =~ /^(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) {
- $a{'date'} = "$3/$4/$2&nbsp;$5:$6";
- }
-
# Flag attachments as to whether or not they can be viewed (as opposed to
# being downloaded). Currently I decide they are viewable if their MIME type
# is either text/*, image/*, or application/vnd.mozilla.*.
@@ -480,8 +475,8 @@ sub insert
my $thedata = SqlQuote($::FORM{'data'});
# Insert the attachment into the database.
- SendSQL("INSERT INTO attachments (bug_id, filename, description, mimetype, ispatch, submitter_id, thedata)
- VALUES ($::FORM{'bugid'}, $filename, $description, $contenttype, $::FORM{'ispatch'}, $::userid, $thedata)");
+ SendSQL("INSERT INTO attachments (bug_id, creation_ts, filename, description, mimetype, ispatch, submitter_id, thedata)
+ VALUES ($::FORM{'bugid'}, now(), $filename, $description, $contenttype, $::FORM{'ispatch'}, $::userid, $thedata)");
# Retrieve the ID of the newly created attachment record.
SendSQL("SELECT LAST_INSERT_ID()");
@@ -676,8 +671,7 @@ sub update
SET description = $quoteddescription ,
mimetype = $quotedcontenttype ,
ispatch = $::FORM{'ispatch'} ,
- isobsolete = $::FORM{'isobsolete'} ,
- creation_ts = creation_ts
+ isobsolete = $::FORM{'isobsolete'}
WHERE attach_id = $::FORM{'id'}
");