Bugzilla – Attachment 44842 Details for
Bug 15182
make test fails immediately on 3.22.00-beta due to missing Crypt::GCrypt which is optional
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15182: Continue to consider Crypt::GCrypt optional
Bug-15182-Continue-to-consider-CryptGCrypt-optiona.patch (text/plain), 1.51 KB, created by
Jonathan Druart
on 2015-11-13 14:39:09 UTC
(
hide
)
Description:
Bug 15182: Continue to consider Crypt::GCrypt optional
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-11-13 14:39:09 UTC
Size:
1.51 KB
patch
obsolete
>From ff9259403dd8bc15cec81b7d12e92d2eeb980263 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 13 Nov 2015 14:34:31 +0000 >Subject: [PATCH] Bug 15182: Continue to consider Crypt::GCrypt optional > >Caused by commit f25fe6ddb4a340f12613784dc841ab5bfd672d6b >Date: Fri Nov 6 11:21:56 2015 -0300 > Bug 15151: Avoid DB access to load C4::Members > >Make Koha::NorwegianPatronDB requires on loading C4::Members. >But Koha::NorwegianPatronDB uses Crypt::GCrypt which is marked as >optional in the deps list. >This patch suggest to load the module only if it can be loaded and does >not explode otherwise. > >Another solution would be to surround the require with an eval, to avoid >to load Module::Load when C4::Members is used. > >Test plan: >uninstall Crypt::GCrypt and try to access the staff interface. >Without this patch, you will get a software error. >--- > C4/Members.pm | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 5f71e89..e0db026 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -41,7 +41,11 @@ use Koha::Borrower::Debarments qw(IsDebarred); > use Text::Unaccent qw( unac_string ); > use Koha::AuthUtils qw(hash_password); > use Koha::Database; >-require Koha::NorwegianPatronDB; >+ >+use Module::Load::Conditional qw( can_load ); >+if ( can_load( modules => { 'Koha::NorwegianPatronDB' => undef } ) ) { >+ load Koha::NorwegianPatronDB, qw( NLUpdateHashedPIN NLEncryptPIN NLSync ); >+} > > our ($VERSION,@ISA,@EXPORT,@EXPORT_OK,$debug); > >-- >2.1.0
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 15182
:
44813
|
44842
|
44844
|
44898
|
44900
|
44906