diff options
author | Dylan William Hardison <dylan@hardison.net> | 2015-10-31 02:03:58 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2015-10-31 02:06:57 +0100 |
commit | 5852295860d51040f69bbaf957cc8ed6bfd7358b (patch) | |
tree | a0781afa608c45912a97c1b2ac3b75e0d8659f2b /Bugzilla.pm | |
parent | f03cb21e297f73fcfca9740ff8e2c525a745d7ad (diff) | |
download | bugzilla-5852295860d51040f69bbaf957cc8ed6bfd7358b.tar.gz bugzilla-5852295860d51040f69bbaf957cc8ed6bfd7358b.tar.xz |
Bug 1218457 - Allow localconfig to override (force) certain data/params values
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r-- | Bugzilla.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm index b14b92e0d..96f7cd0d2 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -324,6 +324,11 @@ sub params { return $_[0]->request_cache->{params} ||= Bugzilla::Config::read_param_file(); } +sub get_param_with_override { + my ($class, $name) = @_; + return $class->localconfig->{param_override}{$name} // $class->params->{$name}; +} + sub user { return $_[0]->request_cache->{user} ||= new Bugzilla::User; } |