Bug 12495 - Include streetnumber in hold alert address
[koha_fer] / cataloguing / z3950_search.pl
index 3cda1b4..d3a3c53 100755 (executable)
@@ -24,12 +24,9 @@ use CGI;
 
 use C4::Auth;
 use C4::Output;
-#use C4::Biblio;
 use C4::Context;
 use C4::Breeding;
 use C4::Koha;
-#use C4::Charset;
-#use ZOOM;
 
 my $input        = new CGI;
 my $dbh          = C4::Context->dbh;
@@ -44,9 +41,9 @@ 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 $stdid                      = $input->param('stdid');
-my $srchany                    = $input->param('srchany');
+my $controlnumber = $input->param('controlnumber');
+my $stdid         = $input->param('stdid');
+my $srchany       = $input->param('srchany');
 my $op            = $input->param('op')||'';
 
 my $page            = $input->param('current_page') || 1;
@@ -56,13 +53,11 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
         template_name   => "cataloguing/z3950_search.tmpl",
         query           => $input,
         type            => "intranet",
-        authnotrequired => 1,
         flagsrequired   => { catalogue => 1 },
-        debug           => 1,
 });
 
-$template->param( frameworkcode => $frameworkcode, );
 $template->param(
+    frameworkcode => $frameworkcode,
     isbn         => $isbn,
     issn         => $issn,
     lccn         => $lccn,
@@ -78,7 +73,7 @@ $template->param(
 );
 
 if ( $op ne "do_search" ) {
-    my $sth = $dbh->prepare("SELECT id,host,name,checked FROM z3950servers ORDER BY rank, name");
+    my $sth = $dbh->prepare("SELECT id,host,name,checked FROM z3950servers WHERE recordtype <> 'authority' ORDER BY rank, name");
     $sth->execute();
     my $serverloop = $sth->fetchall_arrayref( {} );
     $template->param(
@@ -98,19 +93,19 @@ if ( @id==0 ) {
 }
 
 my $pars= {
-        random => $input->param('random') || rand(1000000000),
         biblionumber => $biblionumber,
         page => $page,
         id => \@id,
         isbn => $isbn,
+        issn => $issn,
         title => $title,
         author => $author,
         dewey => $dewey,
         subject => $subject,
         lccall => $lccall,
         controlnumber => $controlnumber,
-        stdid => 0,
-        srchany => 0,
+        stdid => $stdid,
+        srchany => $srchany,
 };
 Z3950Search($pars, $template);
 output_html_with_http_headers $input, $cookie, $template->output;