http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9407
Jonathan Druart <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff --- Comment #5 from Jonathan Druart <[email protected]> --- MJ, Thanks! I will signoff your patch but I have 1 question: Don't you think the following change gives the code easier to read? -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 = $searchtype || ( $quicksearch ? "field_start_with" : "start_with" ); + my $search_scope = ( $input->param('searchtype') eq 'contain' ) + ? 'contain' + : ( $quicksearch ? "field_start_with" : "start_with" ); -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
