Bugzilla – Attachment 3478 Details for
Bug 5977
opac advanced search Library always set to my library
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed Patch
0001-Bug-5977-MT3617-opac-search-advanced-Library-set-to-.patch (text/plain), 1.81 KB, created by
Chris Cormack
on 2011-03-28 20:40:57 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-03-28 20:40:57 UTC
Size:
1.81 KB
patch
obsolete
>From f047558ae2d725f04c0cdef841dc49aabe41e320 Mon Sep 17 00:00:00 2001 >From: Henri-Damien LAURENT <henridamien.laurent@biblibre.com> >Date: Thu, 20 May 2010 12:38:12 +0200 >Subject: [PATCH] Bug 5977 : MT3617 : opac search advanced Library set to my library > >Without any consideration of the System preference SearchMyLibraryFirst, >When patron is logged in, the library set is set to the patron's library. >This is not the expected behaviour and is implied by GetBranchesLoop >and the fact that users library is selected by default. > >Overwriting this behaviour in opac-search.pl when user not logged in >or SearchMyLibraryFirst not set i.e. mybranch not set >--- > opac/opac-search.pl | 12 ++++++++++-- > 1 files changed, 10 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index d22049f..3ed7e1b 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -141,9 +141,17 @@ if (C4::Context->preference('TagsEnabled')) { > > # load the branches > >-my $branches = GetBranches(); # used later in *getRecords, probably should be internalized by those functions after caching in C4::Branch is established >+my $mybranch = ( C4::Context->preference('SearchMyLibraryFirst') && C4::Context->userenv && C4::Context->userenv->{branch} ) ? C4::Context->userenv->{branch} : ''; >+my $branches = GetBranches(); # used later in *getRecords, probably should be internalized by those functions after caching in C4::Branch is established >+my $branchloop = GetBranchesLoop( $mybranch, 0 ); >+unless ($mybranch){ >+ foreach (@$branchloop){ >+ $_->{'selected'}=0; >+ } >+} > $template->param( >- searchdomainloop => GetBranchCategories(undef,'searchdomain'), >+ branchloop => $branchloop, >+ searchdomainloop => GetBranchCategories( undef, 'searchdomain' ), > ); > > # load the language limits (for search) >-- >1.7.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 5977
: 3478