aboutsummaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-05-19 04:40:54 +0000
committerlpsolit%gmail.com <>2006-05-19 04:40:54 +0000
commit232d08fe800c1c36a9bb74953eeac2f4a2d188c3 (patch)
tree8a2449cde56ac7350bb45daa724d73064e5c2706 /process_bug.cgi
parent157112a527273a0010b23ded67856d671dd757f0 (diff)
downloadbugs-232d08fe800c1c36a9bb74953eeac2f4a2d188c3.tar
bugs-232d08fe800c1c36a9bb74953eeac2f4a2d188c3.tar.gz
bugs-232d08fe800c1c36a9bb74953eeac2f4a2d188c3.tar.bz2
bugs-232d08fe800c1c36a9bb74953eeac2f4a2d188c3.tar.xz
bugs-232d08fe800c1c36a9bb74953eeac2f4a2d188c3.zip
Bug 337055: Move AnyDefaultGroups() from globals.pl into process_bug.cgi - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=justdave
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi17
1 files changed, 17 insertions, 0 deletions
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
######################################################################