Bugzilla – Attachment 3364 Details for
Bug 5904
ysearch.pl members improvements (Independant branches behaviour)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-5804-ysearch.pl-members-improvements-Independant.patch (text/plain), 1.33 KB, created by
Chris Cormack
on 2011-03-20 21:26:11 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-03-20 21:26:11 UTC
Size:
1.33 KB
patch
obsolete
>From 00c79c936454fe0f92b42e32ad2ccd5c5d10dc4c Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Wed, 15 Dec 2010 14:25:47 +0100 >Subject: [PATCH 1/2] Bug 5904 : ysearch.pl members improvements (Independant branches behaviour) > >If IntependantBranchesPatron is set, then the search is limited to the librarian branch in circ member auto completion >--- > circ/ysearch.pl | 10 ++++++++-- > 1 files changed, 8 insertions(+), 2 deletions(-) > >diff --git a/circ/ysearch.pl b/circ/ysearch.pl >index f8fc52a..5d4442b 100755 >--- a/circ/ysearch.pl >+++ b/circ/ysearch.pl >@@ -46,8 +46,14 @@ my $sql = qq(SELECT surname, firstname, cardnumber, address, city, zipcode, coun > FROM borrowers > WHERE surname LIKE ? > OR firstname LIKE ? >- OR cardnumber LIKE ? >- ORDER BY surname, firstname); >+ OR cardnumber LIKE ?); >+if (C4::Context->preference("IndependentBranchPatron")){ >+ if (C4::Context->userenv && (C4::Context->userenv->{flags} % 2) !=1 && C4::Context->userenv->{'branch'}){ >+ $sql.=" AND borrowers.branchcode =".$dbh->quote(C4::Context->userenv->{'branch'}) unless (C4::Context->userenv->{'branch'} eq "insecure"); >+ } >+} >+ >+$sql .= qq( ORDER BY surname, firstname); > my $sth = $dbh->prepare( $sql ); > $sth->execute("$query%", "$query%", "$query%"); > >-- >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 5904
:
3364
|
3365
|
3809
|
19259
|
20122
|
20742
|
20750
|
20766