Bug 16807: Frameworks unordered in dropdown when adding/editing a biblio
[koha.git] / cataloguing / z3950_auth_search.pl
index 806b387..c808b7b 100755 (executable)
@@ -29,6 +29,7 @@ use C4::Koha;
 my $input        = new CGI;
 my $dbh          = C4::Context->dbh;
 my $error         = $input->param('error');
+my $authid  = $input->param('authid') || 0;
 my $nameany     = $input->param('nameany');
 my $authorany     = $input->param('authorany');
 my $authorcorp     = $input->param('authorcorp');
@@ -61,6 +62,7 @@ $template->param(
     subject      => $subject,
     subjectsubdiv   => $subjectsubdiv,
     srchany      => $srchany,
+    authid => $authid,
 );
 
 if ( $op ne "do_search" ) {
@@ -75,7 +77,7 @@ if ( $op ne "do_search" ) {
     exit;
 }
 
-my @id = $input->param('id');
+my @id = $input->multi_param('id');
 if ( @id==0 ) {
         # empty server list -> report and exit
         $template->param( emptyserverlist => 1 );
@@ -84,7 +86,7 @@ if ( @id==0 ) {
 }
 
 my $pars= {
-        random => $input->param('random') || rand(1000000000),
+        random => scalar $input->param('random') || rand(1000000000),
         page => $page,
         id => \@id,
         nameany => $nameany,
@@ -97,6 +99,7 @@ my $pars= {
         subject => $subject,
         subjectsubdiv => $subjectsubdiv,
         srchany => $srchany,
+        authid => $authid,
 };
 Z3950SearchAuth($pars, $template);
 output_html_with_http_headers $input, $cookie, $template->output;