Bugzilla – Attachment 44844 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]
[SIGNED-OFF]Bug 15182: Continue to consider Crypt::GCrypt optional
SIGNED-OFFBug-15182-Continue-to-consider-CryptGCry.patch (text/plain), 1.65 KB, created by
Héctor Eduardo Castro Avalos
on 2015-11-13 14:47:20 UTC
(
hide
)
Description:
[SIGNED-OFF]Bug 15182: Continue to consider Crypt::GCrypt optional
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2015-11-13 14:47:20 UTC
Size:
1.65 KB
patch
obsolete
>From 4db9374817742ff8c50d229fd69e2acd992db7aa 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] [SIGNED-OFF]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. > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >Works as advertised. No software error without optional module. >--- > C4/Members.pm | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 2616598..e62e19b 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -40,7 +40,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); > >-- >1.7.10.4
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