Lines 101-113
my @searchfields = $searchfields ? split( ',', $searchfields ) : ( "firstname",
Link Here
|
101 |
$member =~ s/,//g; #remove any commas from search string |
101 |
$member =~ s/,//g; #remove any commas from search string |
102 |
$member =~ s/\*/%/g; |
102 |
$member =~ s/\*/%/g; |
103 |
|
103 |
|
|
|
104 |
my $searchtype = $input->param('searchtype'); |
105 |
my %searchtype_ok = ( 'contain' => 1 ); |
106 |
if ( !defined($searchtype_ok{$searchtype}) ) { |
107 |
undef $searchtype; |
108 |
} |
109 |
|
104 |
my $from = ( $startfrom - 1 ) * $resultsperpage; |
110 |
my $from = ( $startfrom - 1 ) * $resultsperpage; |
105 |
my $to = $from + $resultsperpage; |
111 |
my $to = $from + $resultsperpage; |
106 |
|
112 |
|
107 |
my ($count,$results); |
113 |
my ($count,$results); |
108 |
if ($member || keys %$patron) { |
114 |
if ($member || keys %$patron) { |
109 |
#($results)=Search($member || $patron,{surname=>1,firstname=>1},[$from,$to],undef,["firstname","surname","email","othernames"] ); |
115 |
#($results)=Search($member || $patron,{surname=>1,firstname=>1},[$from,$to],undef,["firstname","surname","email","othernames"] ); |
110 |
my $search_scope = ( $quicksearch ? "field_start_with" : "start_with" ); |
116 |
my $search_scope = $searchtype || ( $quicksearch ? "field_start_with" : "start_with" ); |
111 |
($results) = Search( $member || $patron, \@orderby, undef, undef, \@searchfields, $search_scope ); |
117 |
($results) = Search( $member || $patron, \@orderby, undef, undef, \@searchfields, $search_scope ); |
112 |
} |
118 |
} |
113 |
|
119 |
|
114 |
- |
|
|