]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix nits on bug 180652 - Frederic Buclin
authortravis%sedsystems.ca <>
Wed, 16 Mar 2005 06:08:12 +0000 (06:08 +0000)
committertravis%sedsystems.ca <>
Wed, 16 Mar 2005 06:08:12 +0000 (06:08 +0000)
Bugzilla/Flag.pm
attachment.cgi

index 6d1abfdd9153f71a525086fa94dbc190a99087c1..ea60eebe4595f59491e0a71d64bf99d54275e2d9 100644 (file)
@@ -273,7 +273,7 @@ sub process {
     # Take a snapshot of flags before any changes.
     my @old_summaries = snapshot($bug_id, $attach_id);
     
-    # Cancel old request flags if we are obsoleting an attachment.
+    # Cancel pending requests if we are obsoleting an attachment.
     if ($attach_id && $data->{'isobsolete'}) {
         CancelRequests($bug_id, $attach_id);
     }
@@ -297,9 +297,7 @@ sub process {
         AND i.type_id IS NULL",
         undef, $bug_id);
 
-    foreach my $flag_id (@$flag_ids) {
-        clear($flag_id);
-    }
+    foreach my $flag_id (@$flag_ids) { clear($flag_id) }
 
     $flag_ids = $dbh->selectcol_arrayref(
         "SELECT flags.id 
@@ -312,9 +310,7 @@ sub process {
         AND (bugs.component_id = e.component_id OR e.component_id IS NULL)",
         undef, $bug_id);
 
-    foreach my $flag_id (@$flag_ids) {
-        clear($flag_id);
-    }
+    foreach my $flag_id (@$flag_ids) { clear($flag_id) }
 
     # Take a snapshot of flags after changes.
     my @new_summaries = snapshot($bug_id, $attach_id);
@@ -681,9 +677,7 @@ sub CancelRequests {
 
     # Take a snapshot of flags before any changes.
     my @old_summaries = snapshot($bug_id, $attach_id) if ($timestamp);
-    foreach my $flag (@$request_ids) {
-        clear($flag);
-    }
+    foreach my $flag (@$request_ids) { clear($flag) }
 
     # If $timestamp is undefined, do not update the activity table
     return unless ($timestamp);
index 5f50efb03c92a174dcbb243fa7e6c8b6bea1c05c..bffba5bc46b5c09dbf48a3004d85df0c17d33dc0 100755 (executable)
@@ -1152,9 +1152,10 @@ sub update
   SendSQL("SELECT NOW()");
   my $timestamp = FetchOneColumn();
     
-  # Update flags. These calls must be done before updating the
-  # 'attachments' table due to the deletion of request flags
-  # on attachments being obsoleted.
+  # Update flags.  We have to do this before committing changes
+  # to attachments so that we can delete pending requests if the user
+  # is obsoleting this attachment without deleting any requests
+  # the user submits at the same time.
   my $target = Bugzilla::Flag::GetTarget(undef, $::FORM{'id'});
   Bugzilla::Flag::process($target, $timestamp, \%::FORM);