From 2545c0950c4f0fde8f78b265217fa9f523eff7bf Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 20 Jun 2006 03:15:17 +0000 Subject: =?UTF-8?q?Bug=20304601:=20Bugzilla::Config's=20:locations=20expor?= =?UTF-8?q?ts=20need=20to=20be=20in=20their=20own=20module=20-=20Patch=20b?= =?UTF-8?q?y=20Fr=C3=A9d=C3=A9ric=20Buclin=20=20r=3Dmka?= =?UTF-8?q?nat=20for=20the=20main=20patch,=20r=3Dmyk=20for=20the=20patch?= =?UTF-8?q?=20about=20CGI.pm=20a=3Djustdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug 328637: Remove all legal_* versioncache arrays - Patch by Frédéric Buclin r=mkanat a=justdave Bug 110503 - Eliminate versioncache --- config.cgi | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) (limited to 'config.cgi') diff --git a/config.cgi b/config.cgi index ed16c28a8..6ed57bd85 100755 --- a/config.cgi +++ b/config.cgi @@ -35,19 +35,7 @@ use Bugzilla; use Bugzilla::Constants; use Bugzilla::Keyword; use Bugzilla::Bug; - -# Suppress "used only once" warnings. -use vars - qw( - @legal_priority - @legal_severity - @legal_platform - @legal_opsys - @legal_resolution - ); - -# Use the global template variables defined in globals.pl -# to generate the output. +use Bugzilla::Field; my $user = Bugzilla->login(LOGIN_OPTIONAL); @@ -57,18 +45,15 @@ if (Param('requirelogin') && !$user->id) { display_data(); } -# Retrieve this installation's configuration. -GetVersionTable(); - # Pass a bunch of Bugzilla configuration to the templates. my $vars = {}; -$vars->{'priority'} = \@::legal_priority; -$vars->{'severity'} = \@::legal_severity; -$vars->{'platform'} = \@::legal_platform; -$vars->{'op_sys'} = \@::legal_opsys; +$vars->{'priority'} = get_legal_field_values('priority'); +$vars->{'severity'} = get_legal_field_values('bug_severity'); +$vars->{'platform'} = get_legal_field_values('rep_platform'); +$vars->{'op_sys'} = get_legal_field_values('op_sys'); $vars->{'keyword'} = [map($_->name, Bugzilla::Keyword->get_all)]; -$vars->{'resolution'} = \@::legal_resolution; -$vars->{'status'} = \@::legal_bug_status; +$vars->{'resolution'} = get_legal_field_values('resolution'); +$vars->{'status'} = get_legal_field_values('bug_status'); # Include a list of product objects. $vars->{'products'} = $user->get_selectable_products; @@ -77,7 +62,7 @@ $vars->{'products'} = $user->get_selectable_products; # be made part of the configuration. my @open_status; my @closed_status; -foreach my $status (@::legal_bug_status) { +foreach my $status (@{$vars->{'status'}}) { is_open_state($status) ? push(@open_status, $status) : push(@closed_status, $status); } -- cgit v1.2.1