summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-02-19 01:01:47 +0100
committermkanat%kerio.com <>2005-02-19 01:01:47 +0100
commit62eecf24480520e204ab0057f8f7845c13f37c13 (patch)
tree99252665b81610168701173d4b5ce272c378fda6 /post_bug.cgi
parentc720bf60573fdb92874056ffd07c3d6055df22af (diff)
downloadbugzilla-62eecf24480520e204ab0057f8f7845c13f37c13.tar.gz
bugzilla-62eecf24480520e204ab0057f8f7845c13f37c13.tar.xz
Bug 280494: Replace "SELECT LAST_INSERT_ID()" with Bugzilla::DB function call
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat, a=justdave
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) {