summaryrefslogtreecommitdiffstats
path: root/contrib/bug_email.pl
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bug_email.pl')
-rwxr-xr-xcontrib/bug_email.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/bug_email.pl b/contrib/bug_email.pl
index 1590387e6..98b8d157e 100755
--- a/contrib/bug_email.pl
+++ b/contrib/bug_email.pl
@@ -38,7 +38,7 @@
#
# You need to work with bug_email.pl the MIME::Parser installed.
#
-# $Id: bug_email.pl,v 1.28 2005/07/08 02:31:43 mkanat%kerio.com Exp $
+# $Id: bug_email.pl,v 1.29 2005/08/26 23:11:32 bugreport%peshkin.net Exp $
###############################################################
# 02/12/2000 (SML)
@@ -164,14 +164,16 @@ sub storeAttachments( $$ )
# Make SQL-String
- my $sql = "insert into attachments (bug_id, creation_ts, description, mimetype, ispatch, filename, thedata, submitter_id) values (";
+ my $sql = "insert into attachments (bug_id, creation_ts, description, mimetype, ispatch, filename, submitter_id) values (";
$sql .= "$bugid, now(), " . SqlQuote( $description ) . ", ";
$sql .= SqlQuote( $mime ) . ", ";
$sql .= "0, ";
$sql .= SqlQuote( $decoded_file ) . ", ";
- $sql .= SqlQuote( $data ) . ", ";
$sql .= "$submitter_id );";
SendSQL( $sql ) unless( $test );
+ $sql = "insert into attach_data (id, thedata) values (LAST_INSERT_ID(), ";
+ $sql .= SqlQuote( $data ) . ")";
+ SendSQL( $sql ) unless( $test );
}
return( $att_count );