diff options
author | mkanat%bugzilla.org <> | 2008-08-07 04:38:22 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2008-08-07 04:38:22 +0000 |
commit | 70540fb131c58cf4fb012854759eef2d73528a30 (patch) | |
tree | 82b80ac0bebf506a2852a71606f52bda32f195d0 /Bugzilla/Config.pm | |
parent | bea9199267de2fe96c3214f17b4119ae87dd6a26 (diff) | |
download | bugs-70540fb131c58cf4fb012854759eef2d73528a30.tar bugs-70540fb131c58cf4fb012854759eef2d73528a30.tar.gz bugs-70540fb131c58cf4fb012854759eef2d73528a30.tar.bz2 bugs-70540fb131c58cf4fb012854759eef2d73528a30.tar.xz bugs-70540fb131c58cf4fb012854759eef2d73528a30.zip |
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.pm | 12 |
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; } |