From 429de3bad99ca5506bec6d31d999fc08c5e57f43 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Wed, 12 Oct 2005 05:13:06 +0000 Subject: Bug 282090: Eliminate %classdesc in favor of Bugzilla::Classification methods Patch By Max Kanat-Alexander r=wicked, a=justdave --- enter_bug.cgi | 6 ++---- globals.pl | 11 ++--------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/enter_bug.cgi b/enter_bug.cgi index 7c248ac72..1540209fe 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -56,7 +56,6 @@ use vars qw( %versions %target_milestone $proddesc - $classdesc ); # If we're using bug groups to restrict bug entry, we need to know who the @@ -75,9 +74,9 @@ if (!defined $product || $product eq "") { Bugzilla->login(); if ( ! Param('useclassification') ) { - # just pick the default one + # Just use a fake value for the Classification. $cgi->param(-name => 'classification', - -value => (keys %::classdesc)[0]); + -value => '__all'); } if (!$cgi->param('classification')) { @@ -142,7 +141,6 @@ if (!defined $product || $product eq "") { } $vars->{'proddesc'} = \%products; $vars->{'classifications'} = \%classifications; - $vars->{'classdesc'} = \%::classdesc; $vars->{'target'} = "enter_bug.cgi"; $vars->{'format'} = $cgi->param('format'); diff --git a/globals.pl b/globals.pl index ac502f39a..4d21b088b 100644 --- a/globals.pl +++ b/globals.pl @@ -58,7 +58,6 @@ sub globals_pl_sillyness { $zz = @main::legal_versions; $zz = @main::milestoneurl; $zz = %main::proddesc; - $zz = %main::classdesc; $zz = @main::prodmaxvotes; $zz = $main::template; $zz = $main::userid; @@ -162,12 +161,6 @@ sub GenerateVersionTable { my $mpart = $dotargetmilestone ? ", milestoneurl" : ""; - SendSQL("SELECT name, description FROM classifications ORDER BY name"); - while (@line = FetchSQLData()) { - my ($n, $d) = (@line); - $::classdesc{$n} = $d; - } - SendSQL("SELECT name, description, votesperuser, disallownew$mpart " . "FROM products ORDER BY name"); while (@line = FetchSQLData()) { @@ -252,10 +245,10 @@ sub GenerateVersionTable { '*::legal_bug_status', '*::legal_resolution'])); print $fh (Data::Dumper->Dump([\@::settable_resolution, \%::proddesc, - \%::classifications, \%::classdesc, + \%::classifications, \@::enterable_products, \%::prodmaxvotes], ['*::settable_resolution', '*::proddesc', - '*::classifications', '*::classdesc', + '*::classifications', '*::enterable_products', '*::prodmaxvotes'])); if ($dotargetmilestone) { -- cgit v1.2.3-24-g4f1b