aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkanat%kerio.com <>2006-03-02 05:47:58 +0000
committermkanat%kerio.com <>2006-03-02 05:47:58 +0000
commit6efc4495cf42c61f31397374618ea55bd31a9983 (patch)
tree03d3d4e6600a2d83a0d275bb8282eb04c67cc5c7
parent743a3c34ce6293ad6bc6998f62cc347db2238bb9 (diff)
downloadbugs-6efc4495cf42c61f31397374618ea55bd31a9983.tar
bugs-6efc4495cf42c61f31397374618ea55bd31a9983.tar.gz
bugs-6efc4495cf42c61f31397374618ea55bd31a9983.tar.bz2
bugs-6efc4495cf42c61f31397374618ea55bd31a9983.tar.xz
bugs-6efc4495cf42c61f31397374618ea55bd31a9983.zip
Bug 328436: Move BugInGroupId from globals.pl to process_bug.cgi
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=wicked, a=justdave
-rw-r--r--globals.pl12
-rwxr-xr-xprocess_bug.cgi15
2 files changed, 15 insertions, 12 deletions
diff --git a/globals.pl b/globals.pl
index b9b6e02d5..7242415e4 100644
--- a/globals.pl
+++ b/globals.pl
@@ -487,18 +487,6 @@ sub get_legal_field_values {
return @$result_ref;
}
-sub BugInGroupId {
- my ($bugid, $groupid) = (@_);
- PushGlobalSQLState();
- SendSQL("SELECT CASE WHEN bug_id != 0 THEN 1 ELSE 0 END
- FROM bug_group_map
- WHERE bug_id = $bugid
- AND group_id = $groupid");
- my $bugingroup = FetchOneColumn();
- PopGlobalSQLState();
- return $bugingroup;
-}
-
sub GroupIdToName {
my ($groupid) = (@_);
PushGlobalSQLState();
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
######################################################################