Commit 6efc4495 authored by mkanat%kerio.com's avatar mkanat%kerio.com

Bug 328436: Move BugInGroupId from globals.pl to process_bug.cgi

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=wicked, a=justdave
parent 743a3c34
......@@ -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();
......
......@@ -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
######################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment