aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbbaetz%acm.org <>2008-05-06 04:01:22 +0000
committerbbaetz%acm.org <>2008-05-06 04:01:22 +0000
commit183719adf844b5497699c60625c6268e1640d9de (patch)
treeaba035a87ca988b7712c9bfff386fbe972fe53be /editparams.cgi
parentBump version number post-release. (diff)
downloadbugzilla-183719adf844b5497699c60625c6268e1640d9de.tar.gz
bugzilla-183719adf844b5497699c60625c6268e1640d9de.tar.bz2
bugzilla-183719adf844b5497699c60625c6268e1640d9de.zip
Bug 430909 - add hook for parameters
r=mkanat, r/a=lpsolit
Diffstat (limited to 'editparams.cgi')
-rwxr-xr-xeditparams.cgi13
1 files changed, 8 insertions, 5 deletions
diff --git a/editparams.cgi b/editparams.cgi
index 39faa16c6..9b0094799 100755
--- a/editparams.cgi
+++ b/editparams.cgi
@@ -29,6 +29,7 @@ use Bugzilla;
use Bugzilla::Constants;
use Bugzilla::Config qw(:admin);
use Bugzilla::Config::Common;
+use Bugzilla::Hook;
use Bugzilla::Util;
use Bugzilla::Error;
use Bugzilla::Token;
@@ -56,13 +57,15 @@ $current_panel = $1;
my $current_module;
my @panels = ();
-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 $param_panels = Bugzilla::Config::param_panels();
+foreach my $panel (keys %$param_panels) {
+ my $module = $param_panels->{$panel};
+ eval("require $module") || die $@;
+ my @module_param_list = "$module"->get_param_list(1);
my $item = { name => lc($panel),
current => ($current_panel eq lc($panel)) ? 1 : 0,
param_list => \@module_param_list,
- sortkey => eval "\$Bugzilla::Config::${panel}::sortkey;"
+ sortkey => eval "\$${module}::sortkey;"
};
push(@panels, $item);
$current_module = $panel if ($current_panel eq lc($panel));
@@ -73,7 +76,7 @@ $vars->{panels} = \@panels;
if ($action eq 'save' && $current_module) {
check_token_data($token, 'edit_parameters');
my @changes = ();
- my @module_param_list = "Bugzilla::Config::${current_module}"->get_param_list(1);
+ my @module_param_list = "$param_panels->{$current_module}"->get_param_list(1);
foreach my $i (@module_param_list) {
my $name = $i->{'name'};