Bugzilla – Attachment 87888 Details for
Bug 22688
TT plugin for pickup locations code wrong
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22688: (QA follow-up) Use search_params as all() does
Bug-22688-QA-follow-up-Use-searchparams-as-all-doe.patch (text/plain), 2.78 KB, created by
Kyle M Hall (khall)
on 2019-04-12 12:15:27 UTC
(
hide
)
Description:
Bug 22688: (QA follow-up) Use search_params as all() does
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-04-12 12:15:27 UTC
Size:
2.78 KB
patch
obsolete
>From 560a894151a127201ee834f4d278d9a3ad8056c2 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 11 Apr 2019 17:15:51 -0300 >Subject: [PATCH] Bug 22688: (QA follow-up) Use search_params as all() does > >It looks like selected would be passed all the way down to >Koha::Libraries->search and this would fail all the time. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Template/Plugin/Branches.pm | 6 ++++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 2 +- > 2 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/Koha/Template/Plugin/Branches.pm b/Koha/Template/Plugin/Branches.pm >index df11ab897d..da615f5673 100644 >--- a/Koha/Template/Plugin/Branches.pm >+++ b/Koha/Template/Plugin/Branches.pm >@@ -88,8 +88,10 @@ sub InIndependentBranchesMode { > sub pickup_locations { > my ( $self, $params ) = @_; > >- my $selected = $params->{selected}; >- my $libraries = Koha::Libraries->pickup_locations($params); >+ my $search_params = $params->{search_params} || {}; >+ my $selected = $params->{selected}; >+ my $libraries = Koha::Libraries->pickup_locations($search_params); >+ > for my $l (@$libraries) { > if ( defined $selected and $l->{branchcode} eq $selected > or not defined $selected >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >index d643c80f9a..b26fbaf99d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -231,7 +231,7 @@ > <label for="branch_[% bibitemloo.biblionumber | html %]">Pick up location:</label> > [% UNLESS ( bibitemloo.holdable ) %] > <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]" disabled="disabled"> >- [% PROCESS options_for_libraries libraries => Branches.pickup_locations( biblio => bibitemloo.biblionumber, selected => branch ) %] >+ [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber }, selected => branch }) %] > </select> > [% ELSE %] > [% SET at_least_one_library_not_available_for_pickup = 0 %] >-- >2.20.1 (Apple Git-117)
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 22688
:
87764
|
87765
|
87766
|
87768
|
87772
|
87773
|
87817
|
87818
|
87819
|
87820
|
87884
|
87885
|
87886
|
87887
| 87888