From 992fe6b071ad657eefd406448618bc9457cd33e6 Mon Sep 17 00:00:00 2001 From: paudet Date: Thu, 4 May 2017 14:49:54 -0400 Subject: [PATCH] Remove wrong importation in DataTables/Members.pm https://bugs.koha-community.org/show_bug.cgi?id=12446 --- C4/Members/Attributes.pm | 2 ++ C4/Utils/DataTables/Members.pm | 8 ++++---- members/moremember.pl | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/C4/Members/Attributes.pm b/C4/Members/Attributes.pm index b4f37e0..2f3bd49 100644 --- a/C4/Members/Attributes.pm +++ b/C4/Members/Attributes.pm @@ -388,7 +388,9 @@ sub _sort_by_code { $guarantor_attributes = get_guarantor_attributes(); returns an array reference containing attributes to be shared between guarantor and guarantee. + =cut + sub get_guarantor_shared_attributes{ my @attributes = qw( streetnumber address address2 city state zipcode country branchcode phone phonepro mobile email emailpro fax ); if( my @additional = split(/\|/, C4::Context->preference("AdditionalGuarantorField")) ){ diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm index f151cd1..846bcb3 100644 --- a/C4/Utils/DataTables/Members.pm +++ b/C4/Utils/DataTables/Members.pm @@ -2,7 +2,7 @@ package C4::Utils::DataTables::Members; use Modern::Perl; use C4::Context; -use C4::Members qw/GetMemberIssuesAndFines/; +use C4::Members; use C4::Members::Attributes qw/get_guarantor_shared_attributes/; use C4::Utils::DataTables; use Koha::DateUtils; @@ -49,14 +49,14 @@ sub search { } - my $dbh = C4::Context->dbh; + $dbh = C4::Context->dbh; my @columns = qw( borrowernumber surname firstname streetnumber streettype address address2 city state zipcode country cardnumber dateexpiry borrowernotes branchcode email userid dateofbirth categorycode ); if( my @guarantor_attributes = @{ get_guarantor_shared_attributes() }){ foreach my $item (@guarantor_attributes) { if (! grep {$_ eq $item} @columns) { push @columns, $item; - } - } + } + } }; my $borrowers_columns = ""; foreach my $item (@columns) { diff --git a/members/moremember.pl b/members/moremember.pl index 5fddbeb..7b18fdb 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -218,7 +218,7 @@ if ( $count ) { ( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' || $category_type eq 'I' ); if (my $guarantor = $patron->guarantor){ - $template->param(isguarantor => 1); + $template->param(isguarantor => 1); $template->param(guarantor => $guarantor); } -- 1.9.1