summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Config.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-07-04 06:42:45 +0200
committermkanat%bugzilla.org <>2006-07-04 06:42:45 +0200
commitd15c41c6916aa127a3099a09f592b05d418189b1 (patch)
treec7c4df5cf9fb253f720f275527711ae24503595c /Bugzilla/Config.pm
parentb1f4cf8bdc4b49c02ebebbee2553202bc46ab720 (diff)
downloadbugzilla-d15c41c6916aa127a3099a09f592b05d418189b1.tar.gz
bugzilla-d15c41c6916aa127a3099a09f592b05d418189b1.tar.xz
Bug 338375: Use Bugzilla->params everywhere instead of Param().
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
Diffstat (limited to 'Bugzilla/Config.pm')
-rw-r--r--Bugzilla/Config.pm35
1 files changed, 0 insertions, 35 deletions
diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm
index c4a23f9cb..57c60dbb0 100644
--- a/Bugzilla/Config.pm
+++ b/Bugzilla/Config.pm
@@ -35,9 +35,6 @@ use strict;
use base qw(Exporter);
use Bugzilla::Constants;
-# Module stuff
-@Bugzilla::Config::EXPORT = qw(Param);
-
# Don't export localvars by default - people should have to explicitly
# ask for it, as a (probably futile) attempt to stop code using it
# when it shouldn't
@@ -92,28 +89,6 @@ sub param_panels {
return @param_panels;
}
-sub Param {
- my ($param) = @_;
-
- _load_params unless %params;
- my %param_values = %{Bugzilla->params};
-
- # By this stage, the param must be in the hash
- die "Can't find param named $param" unless (exists $params{$param});
-
- # When module startup code runs (which is does even via -c, when using
- # |use|), we may try to grab params which don't exist yet. This affects
- # tests, so have this as a fallback for the -c case
- return $params{$param}->{default}
- if ($^C && not exists $param_values{$param});
-
- # If we have a value for the param, return it
- return $param_values{$param} if exists $param_values{$param};
-
- # Else error out
- die "No value for param $param (try running checksetup.pl again)";
-}
-
sub SetParam {
my ($name, $value) = @_;
@@ -277,11 +252,6 @@ Bugzilla::Config - Configuration parameters for Bugzilla
=head1 SYNOPSIS
- # Getting parameters
- use Bugzilla::Config;
-
- my $fooSetting = Bugzilla->params->{'foo'};
-
# Administration functions
use Bugzilla::Config qw(:admin);
@@ -305,11 +275,6 @@ Parameters can be set, retrieved, and updated.
=over 4
-=item C<Bugzilla->params->{$name}>
-
-Returns the Param with the specified name. Either a string, or, in the case
-of multiple-choice parameters, an array reference.
-
=item C<SetParam($name, $value)>
Sets the param named $name to $value. Values are checked using the checker