From 3b8f35de7924c48d8d6290b114bcb71f39453d48 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 5 Feb 2016 00:29:22 +0000 Subject: [PATCH] Bug 15629 [QA Followup] * Use ->id instead of ->branchcode when possible to eliminate use of that nomenclature * Fix bad use of ->branchcode to ->{branchcode} for unblessed hashref version of Koha::Library Signed-off-by: Kyle M Hall Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com --- C4/Acquisition.pm | 2 +- catalogue/search.pl | 2 +- members/members-home.pl | 2 +- opac/opac-search.pl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 512924bf49..4a83cb908f 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -2955,7 +2955,7 @@ sub NotifyOrderUsers { my $letter = C4::Letters::GetPreparedLetter( module => 'acquisition', letter_code => 'ACQ_NOTIF_ON_RECEIV', - branchcode => $library->branchcode, + branchcode => $library->{branchcode}, tables => { 'branches' => $library, 'borrowers' => $borrower, diff --git a/catalogue/search.pl b/catalogue/search.pl index dbc12d27cd..fe5d45d329 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -425,7 +425,7 @@ my %is_nolimit = map { $_ => 1 } @nolimits; if($params->{'multibranchlimit'}) { my $library_category = Koha::LibraryCategories->find( $params->{multibranchlimit} ); my @libraries = $library_category->libraries; - my $multibranch = '('.join( " or ", map { 'branch: ' . $_->branchcode } @libraries ) .')'; + my $multibranch = '('.join( " or ", map { 'branch: ' . $_->id } @libraries ) .')'; push @limits, $multibranch if ($multibranch ne '()'); } diff --git a/members/members-home.pl b/members/members-home.pl index f4e0ceab79..89b9793455 100755 --- a/members/members-home.pl +++ b/members/members-home.pl @@ -50,7 +50,7 @@ if ( C4::Branch::onlymine ) { my $userenv = C4::Context->userenv; my $library = Koha::Libraries->find( $userenv->{'branch'} ); push @branchloop, { - value => $library->branchcode, + value => $library->id, branchcode => $library->branchcode, branchname => $library->branchname, selected => 1 diff --git a/opac/opac-search.pl b/opac/opac-search.pl index e75c74ac94..72d054f512 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -482,7 +482,7 @@ if (@searchCategories > 0) { if($params->{'multibranchlimit'}) { my $library_category = Koha::LibraryCategories->find( $params->{multibranchlimit} ); my @libraries = $library_category->libraries; - my $multibranch = '('.join( " or ", map { 'branch: ' . $_->branchcode } @libraries ) .')'; + my $multibranch = '('.join( " or ", map { 'branch: ' . $_->id } @libraries ) .')'; push @limits, $multibranch if ($multibranch ne '()'); } -- 2.39.5