From 4d706df54f2c2545bcd6f13e252f93ebca941fad Mon Sep 17 00:00:00 2001 From: kados Date: Sat, 4 Mar 2006 06:33:54 +0000 Subject: [PATCH] Fixes isbn search in opac -- it seems that '-' is stripped out in marc_word table so if a query includes the - it failed previously. This commit ensure that - is stripped out of the query before submitting. --- opac/opac-search.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 106ae65b84..22e6e4d6ef 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -43,6 +43,10 @@ if ($op eq "do_search") { my $desc_or_asc = $query->param('desc_or_asc'); my $exactsearch = $query->param('exact'); for (my $i=0;$i<=$#marclist;$i++) { + + if ($marclist[$i] eq "biblioitems.isbn") { + $value[$i] =~ s/-//g; + } if ($searchdesc) { # don't put the and_or on the 1st search term $searchdesc .= $and_or[$i].$excluding[$i]." ".($marclist[$i]?$marclist[$i]:"* ")." ".$operator[$i]." ".$value[$i]." " if ($value[$i]); } else { $searchdesc = $excluding[$i].($marclist[$i]?$marclist[$i]:"* ")." ".$operator[$i]." ".$value[$i]." " if ($value[$i]); -- 2.39.5