From: jocuri%softhome.net <> Date: Thu, 1 Apr 2004 16:57:59 +0000 (+0000) Subject: Patch for bug 232554: fix SQL queries in Flag.pm in order to fix a bug that causes... X-Git-Tag: bugzilla-2.18rc1~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=424b881b5bb3418848452a016e162c786ade145a;p=thirdparty%2Fbugzilla.git Patch for bug 232554: fix SQL queries in Flag.pm in order to fix a bug that causes flags to remain set but inaccessible when product changes; patch by Max K-A ; r=bbaetz,myk; a=justdave. --- diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index 8c9a4befe2..3272b84091 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -248,14 +248,14 @@ sub process { ON (flags.type_id = i.type_id AND (bugs.product_id = i.product_id OR i.product_id IS NULL) AND (bugs.component_id = i.component_id OR i.component_id IS NULL)) - WHERE flags.type_id = $target->{'bug'}->{'id'} + WHERE bugs.bug_id = $target->{'bug'}->{'id'} AND i.type_id IS NULL "); clear(&::FetchOneColumn()) while &::MoreSQLData(); &::SendSQL(" SELECT flags.id FROM flags, bugs, flagexclusions e - WHERE flags.type_id = $target->{'bug'}->{'id'} + WHERE bugs.bug_id = $target->{'bug'}->{'id'} AND flags.bug_id = bugs.bug_id AND flags.type_id = e.type_id AND (bugs.product_id = e.product_id OR e.product_id IS NULL)