Bug 5092: No results when searching by LC Call Number: in Z39.50 Server
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Sun, 8 Aug 2010 19:19:41 +0000 (21:19 +0200)
committerGalen Charlton <gmcharlt@gmail.com>
Wed, 6 Oct 2010 12:32:47 +0000 (08:32 -0400)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
acqui/z3950_search.pl
cataloguing/z3950_search.pl

index 444c893..0215873 100755 (executable)
@@ -54,6 +54,7 @@ my $author        = $input->param('author');
 my $isbn          = $input->param('isbn');
 my $issn          = $input->param('issn');
 my $lccn          = $input->param('lccn');
+my $lccall          = $input->param('lccall');
 my $subject= $input->param('subject');
 my $dewey = $input->param('dewey');
 my $op            = $input->param('op');
@@ -114,6 +115,7 @@ if ( $op ne "do_search" ) {
         isbn         => $isbn,
         issn         => $issn,
         lccn         => $lccn,
+        lccall       => $lccall,
         title        => $title,
         author       => $author,
         serverloop   => $serverloop,
@@ -158,6 +160,10 @@ else {
         $query .= " \@attr 1=9 $lccn ";
         $nterms++;
     }
+    if ($lccall) {
+        $query .= " \@attr 1=16 \@attr 2=3 \@attr 3=1 \@attr 4=1 \@attr 5=1 \@attr 6=1 \"$lccall\" ";
+        $nterms++;
+    }
 for my $i (1..$nterms-1) {
     $query = "\@and " . $query;
 }
index cf9e7b2..9b6c8f1 100755 (executable)
@@ -41,6 +41,7 @@ my $author        = $input->param('author');
 my $isbn          = $input->param('isbn');
 my $issn          = $input->param('issn');
 my $lccn          = $input->param('lccn');
+my $lccall        = $input->param('lccall');
 my $subject       = $input->param('subject');
 my $dewey         = $input->param('dewey');
 my $controlnumber      = $input->param('controlnumber');
@@ -88,6 +89,7 @@ if ( $op ne "do_search" ) {
         isbn         => $isbn,
         issn         => $issn,
         lccn         => $lccn,
+        lccall       => $lccall,
         title        => $title,
         author       => $author,
         controlnumber=> $controlnumber,
@@ -136,6 +138,10 @@ else {
         $query .= " \@attr 1=9 $lccn ";
         $nterms++;
     }
+    if ($lccall) {
+        $query .= " \@attr 1=16 \@attr 2=3 \@attr 3=1 \@attr 4=1 \@attr 5=1 \@attr 6=1 \"$lccall\" ";
+        $nterms++;
+    }
     if ($controlnumber) {
         $query .= " \@attr 1=12 \"$controlnumber\" ";
         $nterms++;