diff options
author | mkanat%kerio.com <> | 2006-03-03 08:50:13 +0100 |
---|---|---|
committer | mkanat%kerio.com <> | 2006-03-03 08:50:13 +0100 |
commit | 6c16eddbad9bcef7d7b2d51dc274451a152524fe (patch) | |
tree | 7a153e2f238420fc777d5f7d13cad910f5f54742 /post_bug.cgi | |
parent | 975b2688b862a89f302a77b9a42c8f794fed13a8 (diff) | |
download | bugzilla-6c16eddbad9bcef7d7b2d51dc274451a152524fe.tar.gz bugzilla-6c16eddbad9bcef7d7b2d51dc274451a152524fe.tar.xz |
Bug 328602: Eliminate %::versions and @::legal_versions
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-x | post_bug.cgi | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/post_bug.cgi b/post_bug.cgi index 50ef6ecef..3e589ebe8 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -33,13 +33,13 @@ use Bugzilla::Util; use Bugzilla::Bug; use Bugzilla::User; use Bugzilla::Field; +use Bugzilla::Product; # Shut up misguided -w warnings about "used only once". For some reason, # "use vars" chokes on me when I try it here. sub sillyness { my $zz; $zz = %::components; - $zz = %::versions; $zz = @::legal_opsys; $zz = @::legal_platform; $zz = @::legal_priority; @@ -100,7 +100,8 @@ ValidateComment($comment); my $product = $cgi->param('product'); $user->can_enter_product($product, 1); -my $product_id = get_product_id($product); +my $prod_obj = new Bugzilla::Product({name => $product}); +my $product_id = $prod_obj->id; # Set cookies if (defined $cgi->param('product')) { @@ -223,7 +224,8 @@ check_field('bug_severity', scalar $cgi->param('bug_severity'), \@::legal_severi check_field('priority', scalar $cgi->param('priority'), \@::legal_priority); check_field('op_sys', scalar $cgi->param('op_sys'), \@::legal_opsys); check_field('bug_status', scalar $cgi->param('bug_status'), ['UNCONFIRMED', 'NEW']); -check_field('version', scalar $cgi->param('version'), $::versions{$product}); +check_field('version', scalar $cgi->param('version'), + [map($_->name, @{$prod_obj->versions})]); check_field('component', scalar $cgi->param('component'), $::components{$product}); check_field('target_milestone', scalar $cgi->param('target_milestone'), $::target_milestone{$product}); |