diff options
author | lpsolit%gmail.com <> | 2008-02-25 23:06:24 +0100 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-02-25 23:06:24 +0100 |
commit | 816eb1e9bd788b2b3468481281793639c824996d (patch) | |
tree | 9e272644a04e3dec038785e4d819ff9fe25fe1e6 /post_bug.cgi | |
parent | 8ef50bdaba56ee100821c51ff141e00d26723dc7 (diff) | |
download | bugzilla-816eb1e9bd788b2b3468481281793639c824996d.tar.gz bugzilla-816eb1e9bd788b2b3468481281793639c824996d.tar.xz |
Bug 415652: Implement Bugzilla->active_custom_fields - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-x | post_bug.cgi | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/post_bug.cgi b/post_bug.cgi index fbfdf27f7..957e7b75f 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -124,8 +124,8 @@ $template->process($format->{'template'}, $vars, \$comment) || ThrowTemplateError($template->error()); # Include custom fields editable on bug creation. -my @custom_bug_fields = grep {$_->type != FIELD_TYPE_MULTI_SELECT} - Bugzilla->get_fields({ custom => 1, obsolete => 0, enter_bug => 1 }); +my @custom_bug_fields = grep {$_->type != FIELD_TYPE_MULTI_SELECT && $_->enter_bug} + Bugzilla->active_custom_fields; # Undefined custom fields are ignored to ensure they will get their default # value (e.g. "---" for custom single select fields). @@ -167,9 +167,9 @@ $bug_params{'cc'} = [$cgi->param('cc')]; $bug_params{'groups'} = \@selected_groups; $bug_params{'comment'} = $comment; -my @multi_selects = Bugzilla->get_fields( - { type => FIELD_TYPE_MULTI_SELECT, custom => 1, obsolete => 0, - enter_bug => 1 }); +my @multi_selects = grep {$_->type == FIELD_TYPE_MULTI_SELECT && $_->enter_bug} + Bugzilla->active_custom_fields; + foreach my $field (@multi_selects) { $bug_params{$field->name} = [$cgi->param($field->name)]; } |