From 232d08fe800c1c36a9bb74953eeac2f4a2d188c3 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 19 May 2006 04:40:54 +0000 Subject: =?UTF-8?q?Bug=20337055:=20Move=20AnyDefaultGroups()=20from=20glob?= =?UTF-8?q?als.pl=20into=20process=5Fbug.cgi=20-=20Patch=20by=20Fr=C3=A9d?= =?UTF-8?q?=C3=A9ric=20Buclin=20=20r=3Dmkanat=20a=3Djus?= =?UTF-8?q?tdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process_bug.cgi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'process_bug.cgi') diff --git a/process_bug.cgi b/process_bug.cgi index 8e93e3f09..e92ec5acf 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -99,6 +99,23 @@ sub BugInGroupId { return $in_group; } +# This function checks if there are any default groups defined. +# If so, then groups may have to be changed when bugs move from +# one bug to another. +sub AnyDefaultGroups { + my $dbh = Bugzilla->dbh; + my $any_default = + $dbh->selectrow_array('SELECT 1 + FROM group_control_map + INNER JOIN groups + ON groups.id = group_control_map.group_id + WHERE isactive != 0 + AND (membercontrol = ? OR othercontrol = ?) ' . + $dbh->sql_limit(1), + undef, (CONTROLMAPDEFAULT, CONTROLMAPDEFAULT)); + return $any_default; +} + ###################################################################### # Begin Data/Security Validation ###################################################################### -- cgit v1.2.1