Browse Source

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 <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
new_12478_elasticsearch
Kyle Hall 6 years ago
committed by Brendan Gallagher
parent
commit
3b8f35de79
  1. 2
      C4/Acquisition.pm
  2. 2
      catalogue/search.pl
  3. 2
      members/members-home.pl
  4. 2
      opac/opac-search.pl

2
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,

2
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 '()');
}

2
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

2
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 '()');
}

Loading…
Cancel
Save