Commit 3691bd84 authored by joubu's avatar joubu Committed by Jesse Weaver

Bug 15548: Move new patron related code to Patron*

The 'borrower' should not be used anymore, especially for new code.
This patch move files and rename variables newly pushed (i.e. in the Koha
namespace).

Test plan:
1/
  git grep Koha::Borrower
should not return code in use.

2/
Prove the different modified test files

3/ Do some clicks in the member^Wpatron module to be sure there is not
an obvious error.
Signed-off-by: default avatarHector Castro <hector.hecaxmmx@gmail.com>
Works as described. Tested with Circulation, Members/Patrons, Discharge,
Restrictions modules and the must common functionalities
Signed-off-by: default avatarKyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: default avatarJesse Weaver <jweaver@bywatersolutions.com>
parent d53daa33
......@@ -48,8 +48,8 @@ use Data::Dumper;
use Koha::DateUtils;
use Koha::Calendar;
use Koha::Items;
use Koha::Borrowers;
use Koha::Borrower::Debarments;
use Koha::Patrons;
use Koha::Patron::Debarments;
use Koha::Database;
use Koha::Libraries;
use Carp;
......@@ -2201,7 +2201,7 @@ sub MarkIssueReturned {
if ( C4::Context->preference('StoreLastBorrower') ) {
my $item = Koha::Items->find( $itemnumber );
my $patron = Koha::Borrowers->find( $borrowernumber );
my $patron = Koha::Patrons->find( $borrowernumber );
$item->last_returned_by( $patron );
}
}
......@@ -2265,13 +2265,13 @@ sub _debar_user_on_return {
my $new_debar_dt =
$dt_today->clone()->add_duration( $suspension_days );
Koha::Borrower::Debarments::AddUniqueDebarment({
Koha::Patron::Debarments::AddUniqueDebarment({
borrowernumber => $borrower->{borrowernumber},
expiration => $new_debar_dt->ymd(),
type => 'SUSPENSION',
});
# if borrower was already debarred but does not get an extra debarment
if ( $borrower->{debarred} eq Koha::Borrower::Debarments::IsDebarred($borrower->{borrowernumber}) ) {
if ( $borrower->{debarred} eq Koha::Patron::Debarments::IsDebarred($borrower->{borrowernumber}) ) {
return ($borrower->{debarred},1);
}
return $new_debar_dt->ymd();
......@@ -2834,7 +2834,7 @@ sub CanBookBeRenewed {
my $overduesblockrenewing = C4::Context->preference('OverduesBlockRenewing');
my $restrictionblockrenewing = C4::Context->preference('RestrictionBlockRenewing');
my $restricted = Koha::Borrower::Debarments::IsDebarred($borrowernumber);
my $restricted = Koha::Patron::Debarments::IsDebarred($borrowernumber);
my $hasoverdues = C4::Members::HasOverdues($borrowernumber);
if ( $restricted and $restrictionblockrenewing ) {
......
......@@ -36,7 +36,7 @@ use C4::NewsChannels; #get slip news
use DateTime;
use Koha::Database;
use Koha::DateUtils;
use Koha::Borrower::Debarments qw(IsDebarred);
use Koha::Patron::Debarments qw(IsDebarred);
use Text::Unaccent qw( unac_string );
use Koha::AuthUtils qw(hash_password);
use Koha::Database;
......@@ -516,7 +516,7 @@ sub IsMemberBlocked {
my $borrowernumber = shift;
my $dbh = C4::Context->dbh;
my $blockeddate = Koha::Borrower::Debarments::IsDebarred($borrowernumber);
my $blockeddate = Koha::Patron::Debarments::IsDebarred($borrowernumber);
return ( 1, $blockeddate ) if $blockeddate;
......
......@@ -24,7 +24,7 @@ use Carp;
use C4::Context qw(preference);
use Koha::DateUtils qw(dt_from_string);
use Koha::Borrowers;
use Koha::Patrons;
use Koha::Biblios;
use Koha::Items;
use Koha::Libraries;
......@@ -223,14 +223,14 @@ sub branch {
=head3 borrower
Returns the related Koha::Borrower object for this Hold
Returns the related Koha::Patron object for this Hold
=cut
sub borrower {
my ($self) = @_;
$self->{_borrower} ||= Koha::Borrowers->find( $self->borrowernumber() );
$self->{_borrower} ||= Koha::Patrons->find( $self->borrowernumber() );
return $self->{_borrower};
}
......
......@@ -23,7 +23,7 @@ use Carp;
use Koha::Database;
use Koha::Borrowers;
use Koha::Patrons;
use Koha::Libraries;
use base qw(Koha::Object);
......@@ -78,7 +78,7 @@ sub holding_branch {
Gets and sets the last borrower to return an item.
Accepts and returns Koha::Borrower objects
Accepts and returns Koha::Patron objects
$item->last_returned_by( $borrowernumber );
......@@ -99,7 +99,7 @@ sub last_returned_by {
unless ( $self->{_last_returned_by} ) {
my $result = $items_last_returned_by_rs->single( { itemnumber => $self->id } );
if ($result) {
$self->{_last_returned_by} = Koha::Borrowers->find( $result->get_column('borrowernumber') );
$self->{_last_returned_by} = Koha::Patrons->find( $result->get_column('borrowernumber') );
}
}
......
......@@ -255,7 +255,7 @@ __END__
=head1 SEE ALSO
Koha::Borrower::Files
Koha::Patron::Files
=head1 AUTHOR
......
package Koha::Borrower;
package Koha::Patron;
# Copyright ByWater Solutions 2014
#
......@@ -27,7 +27,7 @@ use base qw(Koha::Object);
=head1 NAME
Koha::Borrower - Koha Borrower Object class
Koha::Patron - Koha Patron Object class
=head1 API
......@@ -37,14 +37,14 @@ Koha::Borrower - Koha Borrower Object class
=head3 guarantor
Returns a Koha::Borrower object for this borrower's guarantor
Returns a Koha::Patron object for this patron's guarantor
=cut
sub guarantor {
my ( $self ) = @_;
return Koha::Borrowers->find( $self->guarantorid() );
return Koha::Patrons->find( $self->guarantorid() );
}
=head3 type
......
package Koha::Borrower::Debarments;
package Koha::Patron::Debarments;
# This file is part of Koha.
#
......@@ -36,9 +36,9 @@ our @EXPORT = qw(
IsDebarred
);
=head1 Koha::Borrower::Debarments
=head1 Koha::Patron::Debarments
Koha::Borrower::Debarments - Module for managing borrower debarments
Koha::Patron::Debarments - Module for managing patron debarments
=cut
......@@ -174,7 +174,7 @@ sub ModDebarment {
my $debarment_expiration = IsDebarred( $borrowernumber );
Returns the date a borrowers debarment will expire, or
undef if the borrower is not debarred
undef if the patron is not debarred
=cut
......
package Koha::Borrower::Discharge;
package Koha::Patron::Discharge;
use Modern::Perl;
use CGI;
......@@ -51,7 +51,7 @@ sub is_discharged {
my $borrowernumber = $params->{borrowernumber};
my $restricted = Koha::Borrower::Debarments::IsDebarred($borrowernumber);
my $restricted = Koha::Patron::Debarments::IsDebarred($borrowernumber);
my $validated = get_validated({borrowernumber => $borrowernumber});
if ($restricted && $validated) {
......@@ -85,7 +85,7 @@ sub discharge {
}
# Debar the member
Koha::Borrower::Debarments::AddDebarment({
Koha::Patron::Debarments::AddDebarment({
borrowernumber => $borrowernumber,
type => 'DISCHARGE',
});
......
package Koha::Borrower::Files;
package Koha::Patron::Files;
# Copyright 2012 Kyle M Hall
#
......@@ -33,7 +33,7 @@ BEGIN {
=head1 NAME
Koha::Borrower::Files - Module for managing borrower files
Koha::Patron::Files - Module for managing patron files
=head1 METHODS
......@@ -52,7 +52,7 @@ sub new {
=item GetFilesInfo()
my $bf = Koha::Borrower::Files->new( borrowernumber => $borrowernumber );
my $bf = Koha::Patron::Files->new( borrowernumber => $borrowernumber );
my $files_hashref = $bf->GetFilesInfo
=cut
......@@ -79,7 +79,7 @@ sub GetFilesInfo {
=item AddFile()
my $bf = Koha::Borrower::Files->new( borrowernumber => $borrowernumber );
my $bf = Koha::Patron::Files->new( borrowernumber => $borrowernumber );
$bh->AddFile( name => $filename, type => $mimetype,
description => $description, content => $content );
......@@ -107,7 +107,7 @@ sub AddFile {
=item GetFile()
my $bf = Koha::Borrower::Files->new( borrowernumber => $borrowernumber );
my $bf = Koha::Patron::Files->new( borrowernumber => $borrowernumber );
my $file = $bh->GetFile( file_id => $file_id );
=cut
......@@ -128,7 +128,7 @@ sub GetFile {
=item DelFile()
my $bf = Koha::Borrower::Files->new( borrowernumber => $borrowernumber );
my $bf = Koha::Patron::Files->new( borrowernumber => $borrowernumber );
$bh->DelFile( file_id => $file_id );
=cut
......
package Koha::Borrower::Modifications;
package Koha::Patron::Modifications;
# Copyright 2012 ByWater Solutions
# This file is part of Koha.
......@@ -18,7 +18,7 @@ package Koha::Borrower::Modifications;
=head1 NAME
C4::Borrowers::Modifications
Koha::Patron::Modifications
=cut
......@@ -35,9 +35,9 @@ sub new {
=head2 AddModifications
Koha::Borrower::Modifications->AddModifications( $data );
Koha::Patron::Modifications->AddModifications( $data );
Adds or updates modifications for a borrower.
Adds or updates modifications for a patron
Requires either the key borrowernumber, or verification_token
to be part of the passed in hash.
......@@ -67,7 +67,7 @@ sub AddModifications {
=head2 Verify
$verified = Koha::Borrower::Modifications->Verify( $verification_token );
$verified = Koha::Patron::Modifications->Verify( $verification_token );
Returns true if the passed in token is valid.
......@@ -96,9 +96,9 @@ sub Verify {
=head2 GetPendingModificationsCount
$count = Koha::Borrower::Modifications->GetPendingModificationsCount();
$count = Koha::Patron::Modifications->GetPendingModificationsCount();
Returns the number of pending modifications for existing borrowers.
Returns the number of pending modifications for existing patron.
=cut
......@@ -128,9 +128,9 @@ sub GetPendingModificationsCount {
=head2 GetPendingModifications
$arrayref = Koha::Borrower::Modifications->GetPendingModifications();
$arrayref = Koha::Patron::Modifications->GetPendingModifications();
Returns an arrayref of hashrefs for all pending modifications for existing borrowers.
Returns an arrayref of hashrefs for all pending modifications for existing patrons.
=cut
......@@ -168,7 +168,7 @@ sub GetPendingModifications {
=head2 ApproveModifications
Koha::Borrower::Modifications->ApproveModifications( $borrowernumber );
Koha::Patron::Modifications->ApproveModifications( $borrowernumber );
Commits the pending modifications to the borrower record and removes
them from the modifications table.
......@@ -197,10 +197,10 @@ sub ApproveModifications {
=head2 DenyModifications
Koha::Borrower::Modifications->DenyModifications( $borrowernumber );
Koha::Patron::Modifications->DenyModifications( $borrowernumber );
Removes the modifications from the table for the given borrower,
without commiting the changes to the borrower record.
Removes the modifications from the table for the given patron,
without committing the changes to the patron record.
=cut
......@@ -217,7 +217,7 @@ sub DenyModifications {
=head2 DelModifications
Koha::Borrower::Modifications->DelModifications({
Koha::Patron::Modifications->DelModifications({
[ borrowernumber => $borrowernumber ],
[ verification_token => $verification_token ]
});
......@@ -258,7 +258,7 @@ sub DelModifications {
=head2 GetModifications
$hashref = Koha::Borrower::Modifications->GetModifications({
$hashref = Koha::Patron::Modifications->GetModifications({
[ borrowernumber => $borrowernumber ],
[ verification_token => $verification_token ]
});
......
package Koha::Borrowers;
package Koha::Patrons;
# Copyright ByWater Solutions 2014
#
......@@ -23,13 +23,13 @@ use Carp;
use Koha::Database;
use Koha::Borrower;
use Koha::Patron;
use base qw(Koha::Objects);
=head1 NAME
Koha::Borrower - Koha Borrower Object class
Koha::Patron - Koha Patron Object class
=head1 API
......@@ -46,7 +46,7 @@ sub _type {
}
sub object_class {
return 'Koha::Borrower';
return 'Koha::Patron';
}
=head1 AUTHOR
......
......@@ -20,7 +20,7 @@ use Mojo::Base 'Mojolicious';
use C4::Auth qw( check_cookie_auth get_session );
use C4::Context;
use Koha::Borrowers;
use Koha::Patrons;
sub startup {
my $self = shift;
......@@ -32,7 +32,7 @@ sub startup {
my ($status, $sessionID) = check_cookie_auth($c->cookie('CGISESSID'));
if ($status eq "ok") {
my $session = get_session($sessionID);
my $user = Koha::Borrowers->find($session->param('number'));
my $user = Koha::Patrons->find($session->param('number'));
$c->stash('koha.user' => $user);
}
......
......@@ -20,7 +20,7 @@ use Modern::Perl;
use Mojo::Base 'Mojolicious::Controller';
use C4::Auth qw( haspermission );
use Koha::Borrowers;
use Koha::Patrons;
sub list_patrons {
my ($c, $args, $cb) = @_;
......@@ -30,7 +30,7 @@ sub list_patrons {
return $c->$cb({error => "You don't have the required permission"}, 403);
}
my $patrons = Koha::Borrowers->search;
my $patrons = Koha::Patrons->search;
$c->$cb($patrons->unblessed, 200);
}
......@@ -47,7 +47,7 @@ sub get_patron {
return $c->$cb({error => "You don't have the required permission"}, 403);
}
my $patron = Koha::Borrowers->find($args->{borrowernumber});
my $patron = Koha::Patrons->find($args->{borrowernumber});
unless ($patron) {
return $c->$cb({error => "Patron not found"}, 404);
}
......
......@@ -22,7 +22,7 @@ use Modern::Perl;
use base qw( Template::Plugin );
use Koha::Borrower::Debarments qw();
use Koha::Patron::Debarments qw();
use C4::Members qw();
=pod
......@@ -46,7 +46,7 @@ sub IsDebarred {
return unless $borrower;
return Koha::Borrower::Debarments::IsDebarred($borrower->{borrowernumber});
return Koha::Patron::Debarments::IsDebarred($borrower->{borrowernumber});
}
sub HasOverdues {
......
......@@ -21,7 +21,7 @@ use Carp;
use C4::Auth;
use Koha::Borrowers;
use Koha::Patrons;
use Koha::Database;
use Koha::DateUtils qw( dt_from_string );
use Koha::Exceptions;
......@@ -238,7 +238,7 @@ sub can_be_deleted {
return 0 unless $borrowernumber;
return 1 if $self->owner == $borrowernumber;
my $patron = Koha::Borrowers->find( $borrowernumber );
my $patron = Koha::Patrons->find( $borrowernumber );
return 1 if $self->category == $PUBLIC and C4::Auth::haspermission( $patron->userid, { lists => 'delete_public_lists' } );
......
......@@ -35,7 +35,7 @@ use C4::Installer;
use Koha;
use Koha::Acquisition::Currencies;
use Koha::Borrowers;
use Koha::Patrons;
use Koha::Config::SysPrefs;
#use Smart::Comments '####';
......@@ -82,8 +82,8 @@ my $warnPrefAnonymousPatron = (
and not C4::Context->preference('AnonymousPatron')
);
my $anonymous_patron = Koha::Borrowers->find( C4::Context->preference('AnonymousPatron') );
my $warnPrefAnonymousPatron_PatronDoesNotExist = ( not $anonymous_patron and Koha::Borrowers->search({ privacy => 2 })->count );
my $anonymous_patron = Koha::Patrons->find( C4::Context->preference('AnonymousPatron') );
my $warnPrefAnonymousPatron_PatronDoesNotExist = ( not $anonymous_patron and Koha::Patrons->search({ privacy => 2 })->count );
my $errZebraConnection = C4::Context->Zconn("biblioserver",0)->errcode();
......
......@@ -26,7 +26,7 @@ use C4::Auth;
use C4::Branch;
use C4::Output;
use C4::Form::MessagingPreferences;
use Koha::Borrowers;
use Koha::Patrons;
use Koha::Database;
use Koha::DateUtils;
use Koha::Patron::Categories;
......@@ -162,7 +162,7 @@ elsif ( $op eq 'add_validate' ) {
}
elsif ( $op eq 'delete_confirm' ) {
my $count = Koha::Borrowers->search({
my $count = Koha::Patrons->search({
categorycode => $categorycode
})->count;
......
......@@ -43,7 +43,7 @@ use Koha::Holds;
use C4::Context;
use CGI::Session;
use C4::Members::Attributes qw(GetBorrowerAttributes);
use Koha::Borrower::Debarments qw(GetDebarments IsDebarred);
use Koha::Patron::Debarments qw(GetDebarments IsDebarred);
use Koha::DateUtils;
use Koha::Database;
use Koha::Patron::Messages;
......
......@@ -28,7 +28,7 @@ use Modern::Perl;
use CGI qw ( -utf8 );
use C4::Context;
use C4::Auth qw/check_cookie_auth/;
use Koha::Borrowers;
use Koha::Patrons;
use Koha::DateUtils qw/format_sqldatetime/;
use JSON qw( to_json );
......@@ -67,7 +67,7 @@ foreach my $p (@parts) {
push( @params, { branchcode => C4::Context->userenv->{branch} } ) if $limit_on_branch;
my $borrowers_rs = Koha::Borrowers->search(
my $borrowers_rs = Koha::Patrons->search(
{ -and => \@params },
{
# Get the first 10 results
......
......@@ -28,8 +28,8 @@ use C4::NewsChannels; # GetNewsToDisplay
use C4::Review qw/numberofreviews/;
use C4::Suggestions qw/CountSuggestion/;
use C4::Tags qw/get_count_by_tag_status/;
use Koha::Borrower::Modifications;
use Koha::Borrower::Discharge;
use Koha::Patron::Modifications;
use Koha::Patron::Discharge;
my $query = new CGI;
......@@ -66,8 +66,8 @@ my $pendingcomments = numberofreviews(0);
my $pendingtags = get_count_by_tag_status(0);
my $pendingsuggestions = CountSuggestion("ASKED");
my $pending_borrower_modifications =
Koha::Borrower::Modifications->GetPendingModificationsCount( $branch );
my $pending_discharge_requests = Koha::Borrower::Discharge::count({ pending => 1 });
Koha::Patron::Modifications->GetPendingModificationsCount( $branch );
my $pending_discharge_requests = Koha::Patron::Discharge::count({ pending => 1 });
$template->param(
pendingcomments => $pendingcomments,
......
......@@ -36,7 +36,7 @@ use C4::Output;
use C4::Members;
use C4::Reserves;
use C4::Letters;
use Koha::Borrower::Discharge;
use Koha::Patron::Discharge;
use Koha::DateUtils;
......@@ -57,7 +57,7 @@ if ( $input->param('borrowernumber') ) {
# Getting member data
$data = GetMember( borrowernumber => $borrowernumber );
my $can_be_discharged = Koha::Borrower::Discharge::can_be_discharged({
my $can_be_discharged = Koha::Patron::Discharge::can_be_discharged({
borrowernumber => $borrowernumber
});
......@@ -67,16 +67,16 @@ if ( $input->param('borrowernumber') ) {
# Generating discharge if needed
if ( $input->param('discharge') and $can_be_discharged ) {
my $is_discharged = Koha::Borrower::Discharge::is_discharged({
my $is_discharged = Koha::Patron::Discharge::is_discharged({
borrowernumber => $borrowernumber,
});
unless ($is_discharged) {
Koha::Borrower::Discharge::discharge({
Koha::Patron::Discharge::discharge({
borrowernumber => $borrowernumber
});
}
eval {
my $pdf_path = Koha::Borrower::Discharge::generate_as_pdf(
my $pdf_path = Koha::Patron::Discharge::generate_as_pdf(
{ borrowernumber => $borrowernumber, branchcode => $data->{'branchcode'} } );
binmode(STDOUT);
......@@ -98,7 +98,7 @@ if ( $input->param('borrowernumber') ) {
}
# Already generated discharges
my $validated_discharges = Koha::Borrower::Discharge::get_validated({
my $validated_discharges = Koha::Patron::Discharge::get_validated({
borrowernumber => $borrowernumber,
});
......
......@@ -23,7 +23,7 @@ use CGI;
use C4::Auth;
use C4::Output;
use C4::Context;
use Koha::Borrower::Discharge;
use Koha::Patron::Discharge;
my $input = new CGI;
my $op = $input->param('op') // 'list';
......@@ -44,12 +44,12 @@ my $branchcode =
if( $op eq 'allow' ) {
my $borrowernumber = $input->param('borrowernumber');
Koha::Borrower::Discharge::discharge({
Koha::Patron::Discharge::discharge({
borrowernumber => $borrowernumber
}) if $borrowernumber;
}
my $pending_discharges = Koha::Borrower::Discharge::get_pendings({
my $pending_discharges = Koha::Patron::Discharge::get_pendings({
branchcode => $branchcode
});
......
......@@ -30,7 +30,7 @@ use C4::Members::Attributes qw(GetBorrowerAttributes);
use C4::Debug;
use Koha::DateUtils;
use Koha::Borrower::Files;
use Koha::Patron::Files;
my $cgi = CGI->new;
......@@ -47,7 +47,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
$template->param( 'borrower_files' => 1 );
my $borrowernumber = $cgi->param('borrowernumber');
my $bf = Koha::Borrower::Files->new( borrowernumber => $borrowernumber );
my $bf = Koha::Patron::Files->new( borrowernumber => $borrowernumber );
my $op = $cgi->param('op') || '';
......@@ -119,7 +119,7 @@ else {
$template->param( picture => 1 ) if $picture;
$template->param(
files => Koha::Borrower::Files->new( borrowernumber => $borrowernumber )
files => Koha::Patron::Files->new( borrowernumber => $borrowernumber )
->GetFilesInfo(),
errors => \%errors,
......
......@@ -39,7 +39,7 @@ use C4::Log;
use C4::Letters;
use C4::Branch; # GetBranches
use C4::Form::MessagingPreferences;
use Koha::Borrower::Debarments;
use Koha::Patron::Debarments;
use Koha::Cities;
use Koha::DateUtils;
use Email::Valid;
......
......@@ -26,7 +26,7 @@ use C4::Context;
use C4::Members;
use C4::Branch;
use C4::Category;
use Koha::Borrower::Modifications;
use Koha::Patron::Modifications;
use Koha::Libraries;
use Koha::List::Patron;
......@@ -89,7 +89,7 @@ else {
my $pending_borrower_modifications =
Koha::Borrower::Modifications->GetPendingModificationsCount( $branch );
Koha::Patron::Modifications->GetPendingModificationsCount( $branch );
$template->param(
no_add => $no_add,
......
......@@ -26,7 +26,7 @@ use C4::Context;
use C4::Members;
use C4::Branch;
use C4::Category;
use Koha::Borrower::Modifications;
use Koha::Patron::Modifications;
my $query = new CGI;
......@@ -50,10 +50,10 @@ foreach my $param (@params) {
my $action = $query->param($param);
if ( $action eq 'approve' ) {
Koha::Borrower::Modifications->ApproveModifications( $borrowernumber );
Koha::Patron::Modifications->ApproveModifications( $borrowernumber );
}
elsif ( $action eq 'deny' ) {
Koha::Borrower::Modifications->DenyModifications( $borrowernumber );
Koha::Patron::Modifications->DenyModifications( $borrowernumber );
}
elsif ( $action eq 'ignore' ) {
......
......@@ -26,7 +26,7 @@ use C4::Context;
use C4::Members;
use C4::Branch;
use C4::Category;
use Koha::Borrower::Modifications;
use Koha::Patron::Modifications;
my $query = new CGI;
......@@ -49,7 +49,7 @@ my $branch =
: undef;
my $pending_modifications =
Koha::Borrower::Modifications->GetPendingModifications($branch);
Koha::Patron::Modifications->GetPendingModifications($branch);
my $borrowers;
foreach my $pm (@$pending_modifications) {
......
......@@ -23,7 +23,7 @@ use CGI qw ( -utf8 );
use C4::Auth;
use Koha::DateUtils;
use Koha::Borrower::Debarments;
use Koha::Patron::Debarments;
my $cgi = new CGI;
......
......@@ -51,8 +51,7 @@ use C4::Branch; # GetBranchName
use C4::Form::MessagingPreferences;
use List::MoreUtils qw/uniq/;
use C4::Members::Attributes qw(GetBorrowerAttributes);
use Koha::Borrower::Debarments qw(GetDebarments IsDebarred);
use Koha::Libraries;
use Koha::Patron::Debarments qw(GetDebarments IsDebarred);
use Module::Load;
if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preference('NorwegianPatronDBEnable') == 1 ) {
load Koha::NorwegianPatronDB, qw( NLGetSyncDataFromBorrowernumber );
......
......@@ -364,7 +364,7 @@ sub PurgeZ3950 {