Bug 10835: fix patron search for using "contains" search type
[koha.git] / members / member.pl
index 47f7cb7..f3d5847 100755 (executable)
@@ -111,7 +111,12 @@ if ($member || keys %$patron) {
         $member = output_pref(dt_from_string($member), 'iso', undef, 1);
     }
 
-    my $search_scope = ( $quicksearch ? "field_start_with" : "start_with" );
+    my $searchtype = $input->param('searchtype');
+    my $search_scope =
+        $quicksearch ? "field_start_with"
+      : $searchtype  ? $searchtype
+      :                "start_with";
+
     ($results) = Search( $member || $patron, \@orderby, undef, undef, \@searchfields, $search_scope );
 }