Bug 7128 - adding some ID's to make styling opac-main.tt a bit easier
[koha.git] / acqui / z3950_search.pl
index 182e121..47dbe52 100755 (executable)
@@ -30,6 +30,7 @@ use C4::Context;
 use C4::Breeding;
 use C4::Koha;
 use C4::Charset;
+use C4::Bookseller qw/ GetBookSellerFromId /;
 use ZOOM;
 
 my $input        = new CGI;
@@ -44,6 +45,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     }
 );
 
+
 my $dbh          = C4::Context->dbh;
 my $error        = $input->param('error');
 my $biblionumber = $input->param('biblionumber');
@@ -57,6 +59,7 @@ 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');
 my $op            = $input->param('op');
 my $booksellerid = $input->param('booksellerid');
 my $basketno = $input->param('basketno');
@@ -101,10 +104,14 @@ foreach my $thisframeworkcode ( keys %$frameworks ) {
     push @frameworkcodeloop, \%row;
 }
 
+my $vendor = GetBookSellerFromId($booksellerid);
 $template->param( frameworkcode => $frameworkcode, 
                                     frameworkcodeloop => \@frameworkcodeloop,
                                     booksellerid => $booksellerid,
-                                    basketno => $basketno);
+                                    basketno => $basketno,
+                                    name => $vendor->{'name'}
+                                    );
+                                    
 
 
 if ( $op ne "do_search" ) {
@@ -118,6 +125,7 @@ if ( $op ne "do_search" ) {
         lccall       => $lccall,
         title        => $title,
         author       => $author,
+        controlnumber=> $controlnumber,
         serverloop   => $serverloop,
         opsearch     => "search",
         biblionumber => $biblionumber,
@@ -164,6 +172,10 @@ else {
         $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++;
+    }
 for my $i (1..$nterms-1) {
     $query = "\@and " . $query;
 }