diff options
author | mkanat%kerio.com <> | 2006-03-02 05:26:18 +0000 |
---|---|---|
committer | mkanat%kerio.com <> | 2006-03-02 05:26:18 +0000 |
commit | 877a6c19c0974eb7e51856b7a2314dbee6079893 (patch) | |
tree | e4a62af31deb816ef3a0615d03196a3b3524d60d /post_bug.cgi | |
parent | Documentation patch: fix spelling for 'comprimise' and 'comprimised'. (diff) | |
download | bugzilla-877a6c19c0974eb7e51856b7a2314dbee6079893.tar.gz bugzilla-877a6c19c0974eb7e51856b7a2314dbee6079893.tar.bz2 bugzilla-877a6c19c0974eb7e51856b7a2314dbee6079893.zip |
Bug 328434: Move GroupIsActive into post_bug.cgi
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=wicked, a=justdave
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-x | post_bug.cgi | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/post_bug.cgi b/post_bug.cgi index 296979b79..50ef6ecef 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -55,6 +55,26 @@ my $dbh = Bugzilla->dbh; my $template = Bugzilla->template; my $vars = {}; +###################################################################### +# Subroutines +###################################################################### + +# Determines whether or not a group is active by checking +# the "isactive" column for the group in the "groups" table. +# Note: This function selects groups by id rather than by name. +sub GroupIsActive { + my ($group_id) = @_; + $group_id ||= 0; + detaint_natural($group_id); + my ($is_active) = Bugzilla->dbh->selectrow_array( + "SELECT isactive FROM groups WHERE id = ?", undef, $group_id); + return $is_active; +} + +###################################################################### +# Main Script +###################################################################### + # do a match on the fields if applicable &Bugzilla::User::match_field ($cgi, { |