summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi5
1 files changed, 3 insertions, 2 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 0f5abddb2..3e5b289a8 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -56,6 +56,8 @@ my $user = Bugzilla->login(LOGIN_REQUIRED);
my $cgi = Bugzilla->cgi;
+my $dbh = Bugzilla->dbh;
+
# do a match on the fields if applicable
&Bugzilla::User::match_field ({
@@ -420,8 +422,7 @@ while (MoreSQLData()) {
SendSQL($sql);
# Get the bug ID back.
-SendSQL("select LAST_INSERT_ID()");
-my $id = FetchOneColumn();
+my $id = $dbh->bz_last_key('bugs', 'bug_id');
# Add the group restrictions
foreach my $grouptoadd (@groupstoadd) {