From cc412c5abec69c5f4e32d21cb906be9c07f3e4ed 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
Content-Type: text/plain; charset=utf-8
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
---
C4/Breeding.pm | 2 +-
acqui/z3950_search.pl | 2 +-
cataloguing/z3950_auth_search.pl | 2 +-
cataloguing/z3950_search.pl | 2 +-
.../prog/en/modules/acqui/z3950_search.tt | 2 +-
.../en/modules/cataloguing/z3950_auth_search.tt | 2 +-
.../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 03f3ed5..0534665 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 659dfa4..6032b12 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 8951b5c..806b387 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 9e05c6e..a4afdcc 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 99096e5..653af7a 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 %]
-
+
[% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt
index 08ba74e..70d6694 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt
@@ -136,7 +136,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
[% ELSE %]
[% END %]
-
+
[% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt
index 37b03dc..6ae50ce 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt
@@ -137,7 +137,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
[% ELSE %]
[% END %]
-
+
[% END %]
--
1.7.7.6