Lines 160-171
sub search {
Link Here
|
160 |
|
160 |
|
161 |
|
161 |
|
162 |
if ( $searchfieldstype eq 'standard' and C4::Context->preference('ExtendedPatronAttributes') and $searchmember ) { |
162 |
if ( $searchfieldstype eq 'standard' and C4::Context->preference('ExtendedPatronAttributes') and $searchmember ) { |
163 |
my @matching_borrowernumbers = Koha::Patrons->filter_by_attribute_value($searchmember)->get_column('borrowernumber'); |
163 |
push @where_strs_or, " borrowernumber IN ( SELECT DISTINCT borrowernumber FROM borrower_attributes JOIN borrower_attribute_types USING (code) WHERE staff_searchable = 1 AND attribute LIKE ? ) "; |
164 |
|
164 |
push @where_args, $term; |
165 |
for my $borrowernumber ( @matching_borrowernumbers ) { |
|
|
166 |
push @where_strs_or, "borrowers.borrowernumber = ?"; |
167 |
push @where_args, $borrowernumber; |
168 |
} |
169 |
} |
165 |
} |
170 |
|
166 |
|
171 |
push @where_strs, '('. join (' OR ', @where_strs_or) . ')' |
167 |
push @where_strs, '('. join (' OR ', @where_strs_or) . ')' |
172 |
- |
|
|