From d012f32eacbdd2edd505ba7a7e8eaf2738295275 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 --- 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 512924b..4a83cb9 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 dbc12d2..fe5d45d 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 f4e0cea..89b9793 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 4a865da..7120a51 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.1.4