From 49979b3775108f709cefbc9190eb9c7546aace94 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 4 Jul 2006 04:23:25 +0000 Subject: Bug 343112: @Bugzilla::Config::parampanels is only defined if something calls _load_params Patch By Max Kanat-Alexander r=LpSolit, a=justdave --- editparams.cgi | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'editparams.cgi') diff --git a/editparams.cgi b/editparams.cgi index 61fc03811..f8c12f581 100755 --- a/editparams.cgi +++ b/editparams.cgi @@ -27,13 +27,11 @@ use lib "."; use Bugzilla; use Bugzilla::Constants; -use Bugzilla::Config qw(:DEFAULT :admin :params); +use Bugzilla::Config qw(:DEFAULT :admin); use Bugzilla::Config::Common; use Bugzilla::Util; use Bugzilla::Error; -use vars qw(@parampanels); - my $user = Bugzilla->login(LOGIN_REQUIRED); my $cgi = Bugzilla->cgi; my $template = Bugzilla->template; @@ -53,9 +51,8 @@ $current_panel = $1; my $current_module; my @panels = (); -foreach my $panel (@parampanels) { - next if ($panel eq 'Common'); - require "Bugzilla/Config/$panel.pm"; +foreach my $panel (Bugzilla::Config::param_panels()) { + eval("require Bugzilla::Config::$panel") || die $@; my @module_param_list = "Bugzilla::Config::${panel}"->get_param_list(1); my $item = { name => lc($panel), current => ($current_panel eq lc($panel)) ? 1 : 0, -- cgit v1.2.3-24-g4f1b