@@ -, +, @@ server searches. I) Apply the patch Keyword (Any) : egypt @attr 4=1 --- C4/Breeding.pm | 11 ++- admin/z3950servers.pl | 2 +- .../prog/en/modules/admin/z3950servers.tt | 78 +++++++++++++++++++++- 3 files changed, 88 insertions(+), 3 deletions(-) --- a/C4/Breeding.pm +++ a/C4/Breeding.pm @@ -156,10 +156,14 @@ sub Z3950Search { ); my @servers = $rs->all; foreach my $server ( @servers ) { + my $server_zquery = $zquery; + if(my $attributes = $server->{attributes}){ + $server_zquery = "$attributes $zquery"; + } $oConnection[$s] = _create_connection( $server ); $oResult[$s] = $server->{servertype} eq 'zed'? - $oConnection[$s]->search_pqf( $zquery ): + $oConnection[$s]->search_pqf( $server_zquery ): $oConnection[$s]->search(new ZOOM::Query::CQL( _translate_query( $server, $squery ))); $s++; @@ -532,6 +536,7 @@ sub Z3950SearchAuth { my $record; my @serverhost; my @servername; + my @server_attributes = (); my @breeding_loop = (); my @oConnection; @@ -617,12 +622,16 @@ sub Z3950SearchAuth { $serverhost[$s] = $server->{host}; $servername[$s] = $server->{servername}; $encoding[$s] = ($server->{encoding}?$server->{encoding}:"iso-5426"); + $server_attributes[$s] = $server->{attributes}; $s++; } ## while fetch } # foreach my $nremaining = $s; for ( my $z = 0 ; $z < $s ; $z++ ) { + if(my $attributes = $server_attributes[$z]){ + $query = "$attributes $query"; + } $oResult[$z] = $oConnection[$z]->search_pqf($query); } --- a/admin/z3950servers.pl +++ a/admin/z3950servers.pl @@ -66,7 +66,7 @@ if( $op eq 'delete_confirmed' && $id ) { $id = 0; } elsif ( $op eq 'add_validated' ) { my @fields=qw/host port db userid password rank syntax encoding timeout - recordtype checked servername servertype sru_options sru_fields + recordtype checked servername servertype sru_options sru_fields attributes add_xslt/; my $formdata = _form_data_hashref( $input, \@fields ); if( $id ) { --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt @@ -18,6 +18,76 @@ [% IF op == 'list' %] [% END %] + + + @@ -83,6 +153,10 @@
  • + [% IF (server.servertype||type) == 'zed' %] +
  • +
  • + [% END %]