From 5b0d410d2deb10777058c262f4f353b5bbafce7d Mon Sep 17 00:00:00 2001
From: Marcel de Rooy
Date: Thu, 5 Jun 2014 08:55:09 +0200
Subject: [PATCH] Bug 6536: Adjustments for servername and servertype
Replaces name by servername, type by servertype for running Z3950 search.
Limit search scripts to zed (z3950) servers until sru is supported.
Test plan:
Perform a Z3950 search in Cataloguing and Acquisition.
Verify that it still works as it did.
Signed-off-by: Giuseppe Angilella
Signed-off-by: Martin Renvoize
Signed-off-by: Tomas Cohen Arazi
---
C4/Breeding.pm | 2 +-
acqui/z3950_search.pl | 2 +-
cataloguing/z3950_auth_search.pl | 2 +-
cataloguing/z3950_search.pl | 2 +-
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt | 2 +-
.../prog/en/modules/cataloguing/z3950_auth_search.tt | 2 +-
.../intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/C4/Breeding.pm b/C4/Breeding.pm
index 03f3ed57d4..0534665aeb 100644
--- a/C4/Breeding.pm
+++ b/C4/Breeding.pm
@@ -227,7 +227,7 @@ sub Z3950Search {
$oConnection[$s]= create ZOOM::Connection($option1);
$oConnection[$s]->connect( $server->{host}, $server->{port} );
$serverinfo[$s]->{host}= $server->{host};
- $serverinfo[$s]->{name}= $server->{name};
+ $serverinfo[$s]->{name}= $server->{servername};
$serverinfo[$s]->{encd}= $server->{encoding} // "iso-5426";
$s++;
} ## while fetch
diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl
index 659dfa4764..6032b12ac2 100755
--- a/acqui/z3950_search.pl
+++ b/acqui/z3950_search.pl
@@ -92,7 +92,7 @@ $template->param(
);
if ( $op ne "do_search" ) {
- my $sth = $dbh->prepare("select id,host,name,checked from z3950servers where recordtype <> 'authority' order by host");
+ my $sth = $dbh->prepare("select id,host,servername,checked from z3950servers where recordtype='biblio' and servertype='zed' order by host");
$sth->execute();
my $serverloop = $sth->fetchall_arrayref( {} );
$template->param(
diff --git a/cataloguing/z3950_auth_search.pl b/cataloguing/z3950_auth_search.pl
index 8951b5cac0..806b387179 100755
--- a/cataloguing/z3950_auth_search.pl
+++ b/cataloguing/z3950_auth_search.pl
@@ -64,7 +64,7 @@ $template->param(
);
if ( $op ne "do_search" ) {
- my $sth = $dbh->prepare("SELECT id,host,name,checked FROM z3950servers WHERE recordtype = 'authority' ORDER BY rank, name");
+ my $sth = $dbh->prepare("SELECT id,host,servername,checked FROM z3950servers WHERE recordtype = 'authority' AND servertype='zed' ORDER BY rank, servername");
$sth->execute();
my $serverloop = $sth->fetchall_arrayref( {} );
$template->param(
diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl
index 9e05c6ea09..a4afdccb40 100755
--- a/cataloguing/z3950_search.pl
+++ b/cataloguing/z3950_search.pl
@@ -73,7 +73,7 @@ $template->param(
);
if ( $op ne "do_search" ) {
- my $sth = $dbh->prepare("SELECT id,host,name,checked FROM z3950servers WHERE recordtype <> 'authority' ORDER BY rank, name");
+ my $sth = $dbh->prepare("SELECT id,host,servername,checked FROM z3950servers WHERE recordtype='biblio' AND servertype='zed' ORDER BY rank, servername");
$sth->execute();
my $serverloop = $sth->fetchall_arrayref( {} );
$template->param(
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt
index 99096e5551..653af7a53d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt
@@ -138,7 +138,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
[% ELSE %]
[% END %]
-
+