Bugzilla – Attachment 122598 Details for
Bug 28622
Selected branchcode incorrectly passed to adv search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28622: (bug 15758 follow-up) Remove incorrect branch selection in adv search
Bug-28622-bug-15758-follow-up-Remove-incorrect-bra.patch (text/plain), 2.53 KB, created by
Jonathan Druart
on 2021-07-06 06:51:54 UTC
(
hide
)
Description:
Bug 28622: (bug 15758 follow-up) Remove incorrect branch selection in adv search
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-07-06 06:51:54 UTC
Size:
2.53 KB
patch
obsolete
>From e500cc66359f20faf6ed6242a525e3021abecb6b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 23 Jun 2021 16:19:15 +0200 >Subject: [PATCH] Bug 28622: (bug 15758 follow-up) Remove incorrect branch > selection in adv search > >From > commit df97814f3034a3d5015546c4eca21f08ae951e37 > Bug 15758: Koha::Libraries - Remove GetBranches > >+ selected_branchcode => ( C4::Context->IsSuperLibrarian ? C4::Context->userenv : '' ), > >And > >- [% PROCESS options_for_libraries libraries => Branches.all() %] >+ [%# FIXME Should not we filter the libraries displayed? %] >+ [% PROCESS options_for_libraries libraries => Branches.all( selected => selected_branchcode, unfiltered => 1 ) %] > >The change in the pl is wrong as it should pass C4::Context->userenv->{branch}, >but prior to this commit it seems that we didn't select the logged in >library anyway. > >Looks like we should remove this code but preserve the current behavior and select "All libraries". >--- > catalogue/search.pl | 1 - > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt | 2 +- > 2 files changed, 1 insertion(+), 2 deletions(-) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index 8bd70fc8935..cd098beac2d 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -235,7 +235,6 @@ my @search_groups = > @search_groups = sort { $a->title cmp $b->title } @search_groups; > > $template->param( >- selected_branchcode => ( C4::Context->IsSuperLibrarian ? C4::Context->userenv : '' ), > search_groups => \@search_groups, > ); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt >index 6660d2ca8f9..a4d7c6d9d76 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt >@@ -287,7 +287,7 @@ > <p><label for="branchloop">Individual libraries:</label><select name="limit" id="branchloop"> > <option value="">All libraries</option> > [%# FIXME Should not we filter the libraries displayed? %] >- [% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( selected => selected_branchcode, unfiltered => 1 ) %] >+ [% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( unfiltered => 1, do_not_select_my_library => 1 ) %] > </select></p> > <!-- <input type="hidden" name="limit" value="branch: MAIN" /> --> > [% IF search_groups %] >-- >2.20.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 28622
:
122339
|
122467
|
122598
|
122750
|
122871