diff options
-rwxr-xr-x | editcomponents.cgi | 14 | ||||
-rwxr-xr-x | editmilestones.cgi | 14 | ||||
-rwxr-xr-x | editproducts.cgi | 14 | ||||
-rwxr-xr-x | editversions.cgi | 14 |
4 files changed, 20 insertions, 36 deletions
diff --git a/editcomponents.cgi b/editcomponents.cgi index dcca05bba..30f9dd4ea 100755 --- a/editcomponents.cgi +++ b/editcomponents.cgi @@ -608,15 +608,11 @@ if ($action eq 'delete') { while (MoreSQLData()) { my $bugid = FetchOneColumn(); - my $query = - $::db->query("DELETE FROM attachments WHERE bug_id=$bugid") - or die "$::db_errstr"; - $query = - $::db->query("DELETE FROM bugs_activity WHERE bug_id=$bugid") - or die "$::db_errstr"; - $query = - $::db->query("DELETE FROM dependencies WHERE blocked=$bugid") - or die "$::db_errstr"; + PushGlobalSQLState(); + SendSQL("DELETE FROM attachments WHERE bug_id=$bugid"); + SendSQL("DELETE FROM bugs_activity WHERE bug_id=$bugid"); + SendSQL("DELETE FROM dependencies WHERE blocked=$bugid"); + PopGlobalSQLState(); } print "Attachments, bug activity and dependencies deleted.<BR>\n"; diff --git a/editmilestones.cgi b/editmilestones.cgi index 57fe78830..4ceda927a 100755 --- a/editmilestones.cgi +++ b/editmilestones.cgi @@ -425,15 +425,11 @@ if ($action eq 'delete') { while (MoreSQLData()) { my $bugid = FetchOneColumn(); - my $query = - $::db->query("DELETE FROM attachments WHERE bug_id=$bugid") - or die "$::db_errstr"; - $query = - $::db->query("DELETE FROM bugs_activity WHERE bug_id=$bugid") - or die "$::db_errstr"; - $query = - $::db->query("DELETE FROM dependencies WHERE blocked=$bugid") - or die "$::db_errstr"; + PushGlobalSQLState(); + SendSQL("DELETE FROM attachments WHERE bug_id=$bugid"); + SendSQL("DELETE FROM bugs_activity WHERE bug_id=$bugid"); + SendSQL("DELETE FROM dependencies WHERE blocked=$bugid"); + PopGlobalSQLState(); } print "Attachments, bug activity and dependencies deleted.<BR>\n"; diff --git a/editproducts.cgi b/editproducts.cgi index f5486f37b..73fdbf487 100755 --- a/editproducts.cgi +++ b/editproducts.cgi @@ -599,15 +599,11 @@ if ($action eq 'delete') { while (MoreSQLData()) { my $bugid = FetchOneColumn(); - my $query = - $::db->do("DELETE FROM attachments WHERE bug_id=$bugid") - or die "$::db_errstr"; - $query = - $::db->do("DELETE FROM bugs_activity WHERE bug_id=$bugid") - or die "$::db_errstr"; - $query = - $::db->do("DELETE FROM dependencies WHERE blocked=$bugid") - or die "$::db_errstr"; + PushGlobalSQLState(); + SendSQL("DELETE FROM attachments WHERE bug_id=$bugid"); + SendSQL("DELETE FROM bugs_activity WHERE bug_id=$bugid"); + SendSQL("DELETE FROM dependencies WHERE blocked=$bugid"); + PopGlobalSQLState(); } print "Attachments, bug activity and dependencies deleted.<BR>\n"; diff --git a/editversions.cgi b/editversions.cgi index 0efbc070b..381d28ed9 100755 --- a/editversions.cgi +++ b/editversions.cgi @@ -436,15 +436,11 @@ if ($action eq 'delete') { while (MoreSQLData()) { my $bugid = FetchOneColumn(); - my $query = - $::db->query("DELETE FROM attachments WHERE bug_id=$bugid") - or die "$::db_errstr"; - $query = - $::db->query("DELETE FROM bugs_activity WHERE bug_id=$bugid") - or die "$::db_errstr"; - $query = - $::db->query("DELETE FROM dependencies WHERE blocked=$bugid") - or die "$::db_errstr"; + PushGlobalSQLState(); + SendSQL("DELETE FROM attachments WHERE bug_id=$bugid"); + SendSQL("DELETE FROM bugs_activity WHERE bug_id=$bugid"); + SendSQL("DELETE FROM dependencies WHERE blocked=$bugid"); + PushGlobalSQLState(); } print "Attachments, bug activity and dependencies deleted.<BR>\n"; |