summaryrefslogtreecommitdiffstats
path: root/config.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-06-20 05:15:17 +0200
committerlpsolit%gmail.com <>2006-06-20 05:15:17 +0200
commit2545c0950c4f0fde8f78b265217fa9f523eff7bf (patch)
tree5bb305644ad11da196c7613b82743e426e2fd337 /config.cgi
parentb687ddef9b6dfeec3d87b7ae211decbf21b6e9a9 (diff)
downloadbugzilla-2545c0950c4f0fde8f78b265217fa9f523eff7bf.tar.gz
bugzilla-2545c0950c4f0fde8f78b265217fa9f523eff7bf.tar.xz
Bug 304601: Bugzilla::Config's :locations exports need to be in their own module - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat for the main patch, r=myk for the patch about CGI.pm a=justdave
Bug 328637: Remove all legal_* versioncache arrays - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=justdave Bug 110503 - Eliminate versioncache
Diffstat (limited to 'config.cgi')
-rwxr-xr-xconfig.cgi31
1 files changed, 8 insertions, 23 deletions
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);
}