summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authormkanat%kerio.com <>2006-03-02 06:47:58 +0100
committermkanat%kerio.com <>2006-03-02 06:47:58 +0100
commit6efc4495cf42c61f31397374618ea55bd31a9983 (patch)
tree03d3d4e6600a2d83a0d275bb8282eb04c67cc5c7 /process_bug.cgi
parent743a3c34ce6293ad6bc6998f62cc347db2238bb9 (diff)
downloadbugzilla-6efc4495cf42c61f31397374618ea55bd31a9983.tar.gz
bugzilla-6efc4495cf42c61f31397374618ea55bd31a9983.tar.xz
Bug 328436: Move BugInGroupId from globals.pl to process_bug.cgi
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=wicked, a=justdave
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi15
1 files changed, 15 insertions, 0 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 345bce592..d37ec5231 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -86,6 +86,21 @@ my $vars = {};
my $requiremilestone = 0;
######################################################################
+# Subroutines
+######################################################################
+
+sub BugInGroupId {
+ my ($bug_id, $group_id) = @_;
+ detaint_natural($bug_id);
+ detaint_natural($group_id);
+ my ($in_group) = Bugzilla->dbh->selectrow_array(
+ "SELECT CASE WHEN bug_id != 0 THEN 1 ELSE 0 END
+ FROM bug_group_map
+ WHERE bug_id = ? AND group_id = ?", undef, ($bug_id, $group_id));
+ return $in_group;
+}
+
+######################################################################
# Begin Data/Security Validation
######################################################################