summaryrefslogtreecommitdiffstats
path: root/createattachment.cgi
diff options
context:
space:
mode:
authorterry%mozilla.org <>1999-06-23 08:44:21 +0200
committerterry%mozilla.org <>1999-06-23 08:44:21 +0200
commit0fc5ea122dba4e408f21045477d6c2ad10639c52 (patch)
tree17cf723849bb287ca5c5be44974e2d9b77566291 /createattachment.cgi
parent97dbac08e62afd64525dcbec4005ea2586e9e02b (diff)
downloadbugzilla-0fc5ea122dba4e408f21045477d6c2ad10639c52.tar.gz
bugzilla-0fc5ea122dba4e408f21045477d6c2ad10639c52.tar.xz
Make attachments remember who submitted that attachment.
Diffstat (limited to 'createattachment.cgi')
-rwxr-xr-xcreateattachment.cgi3
1 files changed, 2 insertions, 1 deletions
diff --git a/createattachment.cgi b/createattachment.cgi
index 225efc02f..97a1f24b4 100755
--- a/createattachment.cgi
+++ b/createattachment.cgi
@@ -89,9 +89,10 @@ What kind of file is this?
if ($mimetype !~ m@^(\w|-)+/(\w|-)+$@) {
Punt("You must select a legal mime type. '<tt>$mimetype</tt>' simply will not do.");
}
- SendSQL("insert into attachments (bug_id, filename, description, mimetype, ispatch, thedata) values ($id," .
+ SendSQL("insert into attachments (bug_id, filename, description, mimetype, ispatch, submitter_id, thedata) values ($id," .
SqlQuote($::FILENAME{'data'}) . ", " . SqlQuote($desc) . ", " .
SqlQuote($mimetype) . ", $ispatch, " .
+ DBNameToIdAndCheck($::COOKIE{'Bugzilla_login'}) . ", " .
SqlQuote($::FORM{'data'}) . ")");
SendSQL("select LAST_INSERT_ID()");
my $attachid = FetchOneColumn();