Bugzilla – Attachment 96912 Details for
Bug 24350
Can't place holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24350: Fix Branches.pickup_locations
Bug-24350-Fix-Branchespickuplocations.patch (text/plain), 1.85 KB, created by
Caroline Cyr La Rose
on 2020-01-07 16:50:50 UTC
(
hide
)
Description:
Bug 24350: Fix Branches.pickup_locations
Filename:
MIME Type:
Creator:
Caroline Cyr La Rose
Created:
2020-01-07 16:50:50 UTC
Size:
1.85 KB
patch
obsolete
>From 0edef9763ff0dff0e9ace84530210e3600b1737e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 6 Jan 2020 22:10:16 +0100 >Subject: [PATCH] Bug 24350: Fix Branches.pickup_locations > >This will fix the following error: >Template process failed: undef error - Not a HASH reference at >/home/vagrant/kohaclone/Koha/Template/Plugin/Branches.pm line 96. > at /home/vagrant/kohaclone/C4/Templates.pm line 122 > >Koha::Libraries->pickup_locations does not always return an array, but >arrayref if $biblio is not a Koha::Biblio object. > >I do not think it's the correct fix, the pattern in >Koha::Libraries->pickup_locations is wrong: we should not expect 2 >different types for a given parameter, biblio should always be a >Koha::Biblio (idem for item btw). >That could be fixed easily if the template had the Koha::Biblio object >sent. > >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >--- > Koha/Template/Plugin/Branches.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/Template/Plugin/Branches.pm b/Koha/Template/Plugin/Branches.pm >index bdb19707de..d677ccdcf0 100644 >--- a/Koha/Template/Plugin/Branches.pm >+++ b/Koha/Template/Plugin/Branches.pm >@@ -90,9 +90,9 @@ sub pickup_locations { > > my $search_params = $params->{search_params} || {}; > my $selected = $params->{selected}; >- my @libraries = map { $_->unblessed } Koha::Libraries->pickup_locations($search_params); >+ my $libraries = Koha::Libraries->pickup_locations($search_params)->unblessed; > >- for my $l (@libraries) { >+ for my $l (@$libraries) { > if ( defined $selected and $l->{branchcode} eq $selected > or not defined $selected > and C4::Context->userenv >@@ -102,7 +102,7 @@ sub pickup_locations { > } > } > >- return \@libraries; >+ return $libraries; > } > > 1; >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24350
:
96860
|
96912
|
96913
|
97231
|
97258
|
97259
|
97260
|
97261
|
97352