@@ -, +, @@ - adds parenthesis to query - modify patron.pref file --- circ/ysearch.pl | 6 +++--- .../prog/en/modules/admin/preferences/patrons.pref | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) --- a/circ/ysearch.pl +++ a/circ/ysearch.pl @@ -44,12 +44,12 @@ if ($auth_status ne "ok") { my $dbh = C4::Context->dbh; my $sql = qq(SELECT surname, firstname, cardnumber, address, city, zipcode, country FROM borrowers - WHERE surname LIKE ? + WHERE (surname LIKE ? OR firstname LIKE ? - OR cardnumber LIKE ?); + 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 .=" AND borrowers.branchcode =".$dbh->quote(C4::Context->userenv->{'branch'}) unless (C4::Context->userenv->{'branch'} eq "insecure"); } } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -107,3 +107,9 @@ Patrons: yes: Do no: "Don't" - store and display surnames in upper case. + - + - pref: IndependentBranchPatron + choices: + yes: Allow + no: "Don't allow" + - limit to the librarian branch in circ member auto completion. --