Bug 11500: Use dateformat syspref and datepicker on additems.pl (and other item catal...
[koha-ffzg.git] / cataloguing / z3950_search.pl
index 22dc565..dcc2581 100755 (executable)
@@ -5,22 +5,21 @@
 #
 # This file is part of Koha.
 #
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
 #
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
-use strict;
-use warnings;
-use CGI;
+use Modern::Perl;
+use CGI qw ( -utf8 );
 
 use C4::Auth;
 use C4::Output;
@@ -78,7 +77,9 @@ if ( $op ne "do_search" ) {
             recordtype => 'biblio',
             servertype => ['zed', 'sru'],
         },
-        { result_class => 'DBIx::Class::ResultClass::HashRefInflator' },
+        {   result_class => 'DBIx::Class::ResultClass::HashRefInflator',
+            order_by     => ['rank', 'servername'],
+        },
     );
     $template->param(
         serverloop   => [ $rs->all ],
@@ -88,7 +89,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 );