From 762eaf9db74630606e776b30c6a82cc3ee661d94 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Sat, 17 May 2008 13:59:07 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20434062:=20Attachment=20flags=20can=20only?= =?UTF-8?q?=20be=20set=20once=20per=20bug=20(regression)=20-=20Patch=20by?= =?UTF-8?q?=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Buclin=20=20a=3DLpSolit=20(module=20owner)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@251684 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/Bugzilla/Flag.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mozilla/webtools/bugzilla/Bugzilla/Flag.pm b/mozilla/webtools/bugzilla/Bugzilla/Flag.pm index a65a8268b1f..6266b0c0cc1 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Flag.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Flag.pm @@ -228,12 +228,12 @@ sub match { # If the caller specified only bug or attachment flags, # limit the query to those kinds of flags. if (my $type = delete $criteria->{'target_type'}) { - if ($type eq 'attachment') { - $criteria->{'attach_id'} = NOT_NULL; - } - else { + if ($type eq 'bug') { $criteria->{'attach_id'} = IS_NULL; } + elsif (!defined $criteria->{'attach_id'}) { + $criteria->{'attach_id'} = NOT_NULL; + } } # Flag->snapshot() calls Flag->match() with bug_id and attach_id # as hash keys, even if attach_id is undefined.