From 5c1d14d8220b283401aa5242331b616e22d37069 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 12 May 2008 08:32:52 -0500 Subject: [PATCH] C4::Members::SearchMember - support attributes Modified SearchMember() so that if the patron attributes feature is on (i.e., ExtendedPatronAttributes is ON), it is possible to search for patrons on any attributes whose type is set as staff searchable. Signed-off-by: Joshua Ferraro --- C4/Members.pm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 18ca449cf0..a1ca5072d6 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -215,9 +215,19 @@ sub SearchMember { # FIXME - .= <preference('ExtendedPatronAttributes')) { + $query .= "OR borrowernumber IN ( +SELECT borrowernumber +FROM borrower_attributes +JOIN borrower_attribute_types USING (code) +WHERE staff_searchable = 1 +AND attribute like ? +)"; + push (@bind, $searchstring); + } + $query .= "order by $orderby"; # FIXME - .= <