From d0002e9626b97df6fad2c597b89c8ec31f7c308a Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 5 Aug 2009 12:35:50 +0000 Subject: Bug 415541: Implement $bug->set_flags() and $attachment->set_flags() - Patch by Frédéric Buclin a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- editflagtypes.cgi | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'editflagtypes.cgi') diff --git a/editflagtypes.cgi b/editflagtypes.cgi index 4dbaae573..b730ae2e5 100755 --- a/editflagtypes.cgi +++ b/editflagtypes.cgi @@ -413,11 +413,7 @@ sub update { WHERE flags.type_id = ? AND i.type_id IS NULL', undef, $id); - my $flags = Bugzilla::Flag->new_from_list($flag_ids); - foreach my $flag (@$flags) { - my $bug = new Bugzilla::Bug($flag->bug_id); - Bugzilla::Flag::clear($flag, $bug, $flag->attachment); - } + Bugzilla::Flag->force_retarget($flag_ids); $flag_ids = $dbh->selectcol_arrayref('SELECT DISTINCT flags.id FROM flags @@ -431,11 +427,7 @@ sub update { AND (bugs.component_id = e.component_id OR e.component_id IS NULL)', undef, $id); - $flags = Bugzilla::Flag->new_from_list($flag_ids); - foreach my $flag (@$flags) { - my $bug = new Bugzilla::Bug($flag->bug_id); - Bugzilla::Flag::clear($flag, $bug, $flag->attachment); - } + Bugzilla::Flag->force_retarget($flag_ids); # Now silently remove requestees from flags which are no longer # specifically requestable. -- cgit v1.2.3-24-g4f1b