Bugzilla – Attachment 76517 Details for
Bug 20998
Non superlibrarians cannot search for patrons using the quicksearch at the top
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20998: Only perform quicksearch if patron found with cardnumber
Bug-20998-Only-perform-quicksearch-if-patron-found.patch (text/plain), 1.54 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-06-27 14:20:49 UTC
(
hide
)
Description:
Bug 20998: Only perform quicksearch if patron found with cardnumber
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-06-27 14:20:49 UTC
Size:
1.54 KB
patch
obsolete
>From 0c884d7eab23f171f6a17a7bc35a292ede6eb149 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 26 Jun 2018 15:02:02 +0000 >Subject: [PATCH] Bug 20998: Only perform quicksearch if patron found with > cardnumber > >This patch makes sure we have a patron before we try to access their >branchcode and allows search to work > >To recreate: >1 - Enable 'IndependentBranches' >2 - Setup a patron with all permissions, but not a superlibrarian >3 - Login to staff client as that patron >4 - Click 'Patrons' in the toolbar and try a search >5 - Internal server error >6 - Apply patch >7 - Try the search again >8 - Success! > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > members/member.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/members/member.pl b/members/member.pl >index 7dc0b1e3af..2fc7fb462a 100755 >--- a/members/member.pl >+++ b/members/member.pl >@@ -53,7 +53,7 @@ if ( $quicksearch and $searchmember ) { > $branchcode = $userenv->{'branch'}; > } > my $patron = Koha::Patrons->find( { cardnumber => $searchmember } ); >- if( ( $branchcode and $patron->branchcode eq $branchcode ) or ( not $branchcode and $patron ) ){ >+ if( ( $branchcode and $patron and $patron->branchcode eq $branchcode ) or ( not $branchcode and $patron ) ){ > print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=" . $patron->borrowernumber); > exit; > } >-- >2.18.0
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 20998
:
76453
|
76455
|
76456
|
76466
|
76467
| 76517 |
76518