summaryrefslogtreecommitdiffstats
path: root/importxml.pl
diff options
context:
space:
mode:
Diffstat (limited to 'importxml.pl')
-rwxr-xr-ximportxml.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/importxml.pl b/importxml.pl
index 21d962d41..3b3b24a17 100755
--- a/importxml.pl
+++ b/importxml.pl
@@ -162,6 +162,7 @@ $xml =~ s/^.+(<\?xml version.+)$/$1/s;
my $parser = new XML::Parser(Style => 'Tree');
my $tree = $parser->parse($xml);
+my $dbh = Bugzilla->dbh;
my $maintainer;
if (defined $tree->[1][0]->{'maintainer'}) {
@@ -609,8 +610,7 @@ for (my $k=1 ; $k <= $bugqty ; $k++) {
. join (",\n", @values)
. "\n)\n";
SendSQL($query);
- SendSQL("select LAST_INSERT_ID()");
- my $id = FetchOneColumn();
+ my $id = $dbh->bz_last_key('bugs', 'bug_id');
if (defined $bug_fields{'cc'}) {
foreach my $person (split(/[ ,]/, $bug_fields{'cc'})) {