From 36abd064648cd88fa853e0f69726c1a68dc14fe5 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 5 Sep 2018 09:05:03 +0100 Subject: [PATCH] Bug 21068: Remove NorwegianPatronDB related code Bug 11401 introduced code to support Norwegian national library card. This code is too specific to be part of Koha as it, it should be a plugin instead. Moreover nobody uses it, but a modified version (see comment 3). RMaint: Rather than backporting the removal as is, I have created a deprecation warning to highlight the codes upcoming removal. Signed-off-by: Martin Renvoize --- C4/Members.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Members.pm b/C4/Members.pm index a901a961bc..89689bfd21 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -298,6 +298,7 @@ sub ModMember { delete $data{password}; } else { if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preference('NorwegianPatronDBEnable') == 1 ) { + warn "C4::Members::ModMember - NorwegianPatronDB hooks will be deprecated as of 18.11.0\n"; # Update the hashed PIN in borrower_sync.hashed_pin, before Koha hashes it Koha::NorwegianPatronDB::NLUpdateHashedPIN( $data{'borrowernumber'}, $data{password} ); } @@ -355,6 +356,7 @@ sub ModMember { # If NorwegianPatronDBEnable is enabled, we set syncstatus to something that a # cronjob will use for syncing with NL if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preference('NorwegianPatronDBEnable') == 1 ) { + warn "C4::Members::ModMember - NorwegianPatronDB hooks will be deprecated as of 18.11.0\n"; my $borrowersync = Koha::Database->new->schema->resultset('BorrowerSync')->find({ 'synctype' => 'norwegianpatrondb', 'borrowernumber' => $data{'borrowernumber'} @@ -465,6 +467,7 @@ sub AddMember { # If NorwegianPatronDBEnable is enabled, we set syncstatus to something that a # cronjob will use for syncing with NL if ( exists $data{'borrowernumber'} && C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preference('NorwegianPatronDBEnable') == 1 ) { + warn "C4::Members::AddMember - NorwegianPatronDB hooks will be deprecated as of 18.11.0\n"; Koha::Database->new->schema->resultset('BorrowerSync')->create({ 'borrowernumber' => $data{'borrowernumber'}, 'synctype' => 'norwegianpatrondb', -- 2.39.5