From: Edmund Yan Date: Tue, 16 Aug 2011 09:52:14 +0000 (+0200) Subject: Bug 675366: Use Bugzilla::Object::remove_from_db() when deleting a component X-Git-Tag: bugzilla-4.3.1~284 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9a17f74d8d28754b04d3820eaea6ba2861f5866;p=thirdparty%2Fbugzilla.git Bug 675366: Use Bugzilla::Object::remove_from_db() when deleting a component r/a=LpSolit --- diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm index dc3cc1b9ef..215119715d 100644 --- a/Bugzilla/Component.pm +++ b/Bugzilla/Component.pm @@ -168,14 +168,7 @@ sub remove_from_db { ThrowUserError('component_has_bugs', {nb => $self->bug_count}); } } - - $dbh->do('DELETE FROM flaginclusions WHERE component_id = ?', - undef, $self->id); - $dbh->do('DELETE FROM flagexclusions WHERE component_id = ?', - undef, $self->id); - $dbh->do('DELETE FROM component_cc WHERE component_id = ?', - undef, $self->id); - $dbh->do('DELETE FROM components WHERE id = ?', undef, $self->id); + $self->SUPER::remove_from_db(); $dbh->bz_commit_transaction(); }