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 <giuseppe.angilella@ct.infn.it> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
7748facfa5
commit
5b0d410d2d
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
|
|||
[% ELSE %]
|
||||
<input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" />
|
||||
[% END %]
|
||||
<label for="z3950_[% serverloo.id %]">[% serverloo.name %] [[% serverloo.host %]]</label>
|
||||
<label for="z3950_[% serverloo.id %]">[% serverloo.servername %] [[% serverloo.host %]]</label>
|
||||
|
||||
</p>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
|
|||
[% ELSE %]
|
||||
<input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" />
|
||||
[% END %]
|
||||
<label for="z3950_[% serverloo.id %]">[% serverloo.name %]</label>
|
||||
<label for="z3950_[% serverloo.id %]">[% serverloo.servername %]</label>
|
||||
</p>
|
||||
[% END %]
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
|
|||
[% ELSE %]
|
||||
<input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" />
|
||||
[% END %]
|
||||
<label for="z3950_[% serverloo.id %]">[% serverloo.name %]</label>
|
||||
<label for="z3950_[% serverloo.id %]">[% serverloo.servername %]</label>
|
||||
|
||||
</p>
|
||||
[% END %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue