$member =~ s/,//g; #remove any commas from search string
$member =~ s/\*/%/g;
+my $searchtype = $input->param('searchtype');
+my %searchtype_ok = ( 'contain' => 1 );
+if ( !defined($searchtype_ok{$searchtype}) ) {
+ undef $searchtype;
+}
+
my $from = ( $startfrom - 1 ) * $resultsperpage;
my $to = $from + $resultsperpage;
my ($count,$results);
if ($member || keys %$patron) {
#($results)=Search($member || $patron,{surname=>1,firstname=>1},[$from,$to],undef,["firstname","surname","email","othernames"] );
- my $search_scope = ( $quicksearch ? "field_start_with" : "start_with" );
+ my $search_scope = $searchtype || ( $quicksearch ? "field_start_with" : "start_with" );
($results) = Search( $member || $patron, \@orderby, undef, undef, \@searchfields, $search_scope );
}