summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Config.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-08-07 06:38:22 +0200
committermkanat%bugzilla.org <>2008-08-07 06:38:22 +0200
commit70540fb131c58cf4fb012854759eef2d73528a30 (patch)
tree82b80ac0bebf506a2852a71606f52bda32f195d0 /Bugzilla/Config.pm
parentbea9199267de2fe96c3214f17b4119ae87dd6a26 (diff)
downloadbugzilla-70540fb131c58cf4fb012854759eef2d73528a30.tar.gz
bugzilla-70540fb131c58cf4fb012854759eef2d73528a30.tar.xz
Bug 438435: Need code hooks for authentication
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
Diffstat (limited to 'Bugzilla/Config.pm')
-rw-r--r--Bugzilla/Config.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm
index 428c13fe5..3666861f0 100644
--- a/Bugzilla/Config.pm
+++ b/Bugzilla/Config.pm
@@ -34,6 +34,7 @@ use strict;
use base qw(Exporter);
use Bugzilla::Constants;
+use Bugzilla::Hook;
use Data::Dumper;
use File::Temp;
@@ -54,15 +55,21 @@ our %params;
# Load in the param definitions
sub _load_params {
my $panels = param_panels();
+ my %hook_panels;
foreach my $panel (keys %$panels) {
my $module = $panels->{$panel};
eval("require $module") || die $@;
- my @new_param_list = "$module"->get_param_list();
+ my @new_param_list = $module->get_param_list();
+ $hook_panels{lc($panel)} = { params => \@new_param_list };
foreach my $item (@new_param_list) {
$params{$item->{'name'}} = $item;
}
push(@param_list, @new_param_list);
}
+ # This hook is also called in editparams.cgi. This call here is required
+ # to make SetParam work.
+ Bugzilla::Hook::process('config-modify_panels',
+ { panels => \%hook_panels });
}
# END INIT CODE
@@ -77,7 +84,8 @@ sub param_panels {
$param_panels->{$module} = "Bugzilla::Config::$module" unless $module eq 'Common';
}
# Now check for any hooked params
- Bugzilla::Hook::process('config', { config => $param_panels });
+ Bugzilla::Hook::process('config-add_panels',
+ { panel_modules => $param_panels });
return $param_panels;
}