diff options
-rw-r--r-- | globals.pl | 12 | ||||
-rwxr-xr-x | process_bug.cgi | 15 |
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 ###################################################################### |