From b1f4cf8bdc4b49c02ebebbee2553202bc46ab720 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 4 Jul 2006 04:26:20 +0000 Subject: Bug 342869: Use Bugzilla->params everywhere except templates Patch By Max Kanat-Alexander r=LpSolit, a=justdave --- Bugzilla/Auth/Verify/LDAP.pm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'Bugzilla/Auth/Verify/LDAP.pm') diff --git a/Bugzilla/Auth/Verify/LDAP.pm b/Bugzilla/Auth/Verify/LDAP.pm index 2ee5247ec..713619589 100644 --- a/Bugzilla/Auth/Verify/LDAP.pm +++ b/Bugzilla/Auth/Verify/LDAP.pm @@ -85,7 +85,7 @@ sub check_credentials { my $user_entry = $detail_result->shift_entry; - my $mail_attr = Param("LDAPmailattribute"); + my $mail_attr = Bugzilla->params->{"LDAPmailattribute"}; if ($mail_attr) { if (!$user_entry->exists($mail_attr)) { return { failure => AUTH_ERROR, @@ -106,17 +106,19 @@ sub check_credentials { sub _bz_search_params { my ($username) = @_; - return (base => Param("LDAPBaseDN"), + return (base => Bugzilla->params->{"LDAPBaseDN"}, scope => "sub", - filter => '(&(' . Param("LDAPuidattribute") . "=$username)" - . Param("LDAPfilter") . ')'); + filter => '(&(' . Bugzilla->params->{"LDAPuidattribute"} + . "=$username)" + . Bugzilla->params->{"LDAPfilter"} . ')'); } sub _bind_ldap_anonymously { my ($self) = @_; my $bind_result; - if (Param("LDAPbinddn")) { - my ($LDAPbinddn,$LDAPbindpass) = split(":",Param("LDAPbinddn")); + if (Bugzilla->params->{"LDAPbinddn"}) { + my ($LDAPbinddn,$LDAPbindpass) = + split(":",Bugzilla->params->{"LDAPbinddn"}); $bind_result = $self->ldap->bind($LDAPbinddn, password => $LDAPbindpass); } @@ -136,7 +138,7 @@ sub ldap { my ($self) = @_; return $self->{ldap} if $self->{ldap}; - my $server = Param("LDAPserver"); + my $server = Bugzilla->params->{"LDAPserver"}; ThrowCodeError("ldap_server_not_defined") unless $server; my $port = DEFAULT_PORT; @@ -166,7 +168,7 @@ sub ldap { || ThrowCodeError("ldap_connect_failed", { server => $conn_string }); # try to start TLS if needed - if (Param("LDAPstarttls")) { + if (Bugzilla->params->{"LDAPstarttls"}) { my $mesg = $self->{ldap}->start_tls(); ThrowCodeError("ldap_start_tls_failed", { error => $mesg->error() }) if $mesg->code(); -- cgit v1.2.3-24-g4f1b