Bugzilla – Attachment 58188 Details for
Bug 17764
OPAC search fails when lost items are in the result set and there is no logged in user
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 17764: (bug 17556 follow-up) Fix search for logged out users and lost items
SIGNED-OFF-Bug-17764-bug-17556-follow-up-Fix-searc.patch (text/plain), 1.45 KB, created by
Owen Leonard
on 2016-12-14 18:26:27 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17764: (bug 17556 follow-up) Fix search for logged out users and lost items
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-12-14 18:26:27 UTC
Size:
1.45 KB
patch
obsolete
>From 8e570825c787b78bbfbd8302fe49e25807e6c1ab Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 13 Dec 2016 12:28:35 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 17764: (bug 17556 follow-up) Fix search for > logged out users and lost items >Content-Type: text/plain; charset="utf-8" > >If you are non logged-in and you the search result contain lost items, >you will get: >Can't call method "category" on an undefined value at >/home/liz/koha-src/koha/C4/Search.pm line 2091. > >This is because bug 17556 assumed that $userenv was not defined when the >user is logged out. Actually it is, with non defined or empty string >values. > >Test plan: >Do a search in the opac that would turn up a whole list of results (and >not just that one) with the lost item included. > => Without this patch you should get an error > => With this patch applied you should see the search results > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > C4/Search.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 4d89d23..4270c82 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -2090,6 +2090,7 @@ sub searchResults { > my $userenv = C4::Context->userenv; > if ( $item->{onloan} > && $userenv >+ && $userenv->{number} > && !( Koha::Patrons->find($userenv->{number})->category->hidelostitems && $item->{itemlost} ) ) > { > $onloan_count++; >-- >2.1.4
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 17764
:
58182
|
58188
|
58261