BUGFIX on title search : only the 1st word was searched, making an internal server error when it was en empty word
This commit is contained in:
parent
f9f9ddab31
commit
9bb212dd76
|
|
@ -19,10 +19,10 @@
|
|||
<form method="post" action="search.pl" name="f">
|
||||
|
||||
<input type="hidden" name="op" id="op" value="do_search" />
|
||||
<input type="hidden" name="title" value=<!-- TMPL_VAR NAME="title" --> />
|
||||
<input type="hidden" name="author" value=<!-- TMPL_VAR NAME="author" --> />
|
||||
<input type="hidden" name="isbn" value=<!-- TMPL_VAR NAME="isbn" --> />
|
||||
<input type="hidden" name="issn" value=<!-- TMPL_VAR NAME="issn" --> />
|
||||
<input type="hidden" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
|
||||
<input type="hidden" name="author" value="<!-- TMPL_VAR NAME="author" -->" />
|
||||
<input type="hidden" name="isbn" value="<!-- TMPL_VAR NAME="isbn" -->" />
|
||||
<input type="hidden" name="issn" value="<!-- TMPL_VAR NAME="issn" -->" />
|
||||
<input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="oldbiblionumber" -->" />
|
||||
|
||||
<!-- TMPL_LOOP name="serverloop" -->
|
||||
|
|
|
|||
|
|
@ -102,13 +102,13 @@ if ($op ne "do_search"){
|
|||
my @oResult;
|
||||
my $s=0;
|
||||
|
||||
if ($isbn ne "/" || $issn ne "/") {
|
||||
if ($isbn || $issn) {
|
||||
$attr='1=7';
|
||||
# warn "isbn : $isbn";
|
||||
$term=$isbn if ($isbn ne "/");
|
||||
$term=$issn if ($issn ne "/");
|
||||
} elsif ($title ne "/") {
|
||||
$attr='1=4 @attr 4=1 ';
|
||||
$attr='1=4 ';
|
||||
$term=$title;
|
||||
} elsif ($author ne "/") {
|
||||
$attr='1=1003';
|
||||
|
|
@ -116,7 +116,7 @@ if ($op ne "do_search"){
|
|||
}
|
||||
|
||||
my $query="\@attr $attr \"$term\"";
|
||||
# warn "query ".$query;
|
||||
warn "query ".$query;
|
||||
foreach my $servid (@id){
|
||||
my $sth=$dbh->prepare("select * from z3950servers where id=?");
|
||||
$sth->execute($servid);
|
||||
|
|
|
|||
Loading…
Reference in New Issue