Bugzilla – Attachment 121361 Details for
Bug 28385
LDAP server configuration broken since migration from XML::Simple
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28385: Use ldapserver only if exists
Bug-28385-Use-ldapserver-only-if-exists.patch (text/plain), 1.65 KB, created by
Jonathan Druart
on 2021-05-25 08:35:30 UTC
(
hide
)
Description:
Bug 28385: Use ldapserver only if exists
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-05-25 08:35:30 UTC
Size:
1.65 KB
patch
obsolete
>From 11aeba3b6864a4cc7720a9e3c9e299ebc7e5f84b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 25 May 2021 10:34:49 +0200 >Subject: [PATCH] Bug 28385: Use ldapserver only if exists > >Fix test >t/db_dependent/Auth_with_ldap.t .. 1/4 > # Failed test 'use C4::Auth_with_ldap;' > # at t/db_dependent/Auth_with_ldap.t line 123. > # Tried to use 'C4::Auth_with_ldap'. > # Error: No ldapserver "id="ldapserver"" defined in KOHA_CONF: /etc/koha/sites/kohadev/koha-conf.xml at /kohadevbox/koha/C4/Auth_with_ldap.pm line 55. > # Compilation failed in require at t/db_dependent/Auth_with_ldap.t line 123. > # BEGIN failed--compilation aborted at t/db_dependent/Auth_with_ldap.t line 123. >--- > C4/Auth_with_ldap.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >index face1e428f3..c87ea20c935 100644 >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -52,7 +52,9 @@ sub ldapserver_error { > use vars qw($mapping @ldaphosts $base $ldapname $ldappassword); > my $ldap = C4::Context->config("ldapserver") or die 'No "ldapserver" in server hash from KOHA_CONF: ' . $ENV{KOHA_CONF}; > # since Bug 28278 we need to skip id in <ldapserver id="ldapserver"> which generates additional hash level >-$ldap = $ldap->{ldapserver} or die ldapserver_error('id="ldapserver"'); >+if ( exists $ldap->{ldapserver} ) { >+ $ldap = $ldap->{ldapserver} or die ldapserver_error('id="ldapserver"'); >+} > my $prefhost = $ldap->{hostname} or die ldapserver_error('hostname'); > my $base = $ldap->{base} or die ldapserver_error('base'); > $ldapname = $ldap->{user} ; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28385
:
121147
|
121148
|
121244
|
121263
|
121265
|
121279
| 121361