|
Lines 94-99
else {
Link Here
|
| 94 |
@orderby = ({surname=>0},{firstname=>0}); |
94 |
@orderby = ({surname=>0},{firstname=>0}); |
| 95 |
} |
95 |
} |
| 96 |
|
96 |
|
|
|
97 |
my $searchfields = $input->param('searchfields'); |
| 98 |
my @searchfields = $searchfields ? split( ',', $searchfields ) : ( "firstname", "surname", "othernames", "cardnumber", "userid", "email" ); |
| 99 |
|
| 97 |
$member =~ s/,//g; #remove any commas from search string |
100 |
$member =~ s/,//g; #remove any commas from search string |
| 98 |
$member =~ s/\*/%/g; |
101 |
$member =~ s/\*/%/g; |
| 99 |
|
102 |
|
|
Lines 104-110
my ($count,$results);
Link Here
|
| 104 |
if ($member || keys %$patron) { |
107 |
if ($member || keys %$patron) { |
| 105 |
#($results)=Search($member || $patron,{surname=>1,firstname=>1},[$from,$to],undef,["firstname","surname","email","othernames"] ); |
108 |
#($results)=Search($member || $patron,{surname=>1,firstname=>1},[$from,$to],undef,["firstname","surname","email","othernames"] ); |
| 106 |
my $search_scope = ( $quicksearch ? "field_start_with" : "start_with" ); |
109 |
my $search_scope = ( $quicksearch ? "field_start_with" : "start_with" ); |
| 107 |
($results) = Search( $member || $patron, \@orderby, undef, undef, [ "firstname", "surname", "othernames", "cardnumber", "userid", "email" ], $search_scope ); |
110 |
($results) = Search( $member || $patron, \@orderby, undef, undef, \@searchfields, $search_scope ); |
| 108 |
} |
111 |
} |
| 109 |
|
112 |
|
| 110 |
if ($results) { |
113 |
if ($results) { |
| 111 |
- |
|
|