View | Details | Raw Unified | Return to bug 40481
Collapse All | Expand All

(-)a/cataloguing/z3950_auth_search.pl (-5 / +10 lines)
Lines 27-32 use C4::Breeding qw( Z3950Search Z3950SearchAuth ); Link Here
27
use MARC::Record;
27
use MARC::Record;
28
use Koha::Authorities;
28
use Koha::Authorities;
29
use Koha::Authority::Types;
29
use Koha::Authority::Types;
30
use Koha::Z3950Servers;
30
use C4::AuthoritiesMarc qw( GetAuthority );
31
use C4::AuthoritiesMarc qw( GetAuthority );
31
32
32
my $input  = CGI->new;
33
my $input  = CGI->new;
Lines 97-109 $template->param( Link Here
97
);
98
);
98
99
99
if ( $op ne "cud-do_search" ) {
100
if ( $op ne "cud-do_search" ) {
100
    my $sth = $dbh->prepare(
101
    my $servers = Koha::Z3950Servers->search_with_library_limits(
101
        "SELECT id,host,servername,checked FROM z3950servers WHERE recordtype = 'authority' ORDER BY `rank`, servername"
102
        {
103
            recordtype => 'authority',
104
        },
105
        {
106
            order_by => [ 'rank', 'servername' ],
107
        },
108
        C4::Context->userenv ? C4::Context->userenv->{branch} : undef
102
    );
109
    );
103
    $sth->execute();
104
    my $serverloop = $sth->fetchall_arrayref( {} );
105
    $template->param(
110
    $template->param(
106
        serverloop => $serverloop,
111
        serverloop => $servers,
107
        opsearch   => "cud-search",
112
        opsearch   => "cud-search",
108
        index      => $index,
113
        index      => $index,
109
    );
114
    );
(-)a/cataloguing/z3950_search.pl (-6 / +6 lines)
Lines 26-31 use C4::Output qw( output_html_with_http_headers ); Link Here
26
use C4::Context;
26
use C4::Context;
27
use C4::Breeding qw( Z3950Search );
27
use C4::Breeding qw( Z3950Search );
28
28
29
use Koha::Z3950Servers;
30
29
my $input           = CGI->new;
31
my $input           = CGI->new;
30
my $error           = $input->param('error');
32
my $error           = $input->param('error');
31
my $biblionumber    = $input->param('biblionumber') || 0;
33
my $biblionumber    = $input->param('biblionumber') || 0;
Lines 74-92 $template->param( Link Here
74
);
76
);
75
77
76
if ( $op ne "cud-do_search" ) {
78
if ( $op ne "cud-do_search" ) {
77
    my $schema = Koha::Database->new()->schema();
79
    my $servers = Koha::Z3950Servers->search_with_library_limits(
78
    my $rs     = $schema->resultset('Z3950server')->search(
79
        {
80
        {
80
            recordtype => 'biblio',
81
            recordtype => 'biblio',
81
            servertype => [ 'zed', 'sru' ],
82
            servertype => [ 'zed', 'sru' ],
82
        },
83
        },
83
        {
84
        {
84
            result_class => 'DBIx::Class::ResultClass::HashRefInflator',
85
            order_by => [ 'rank', 'servername' ],
85
            order_by     => [ 'rank', 'servername' ],
86
        },
86
        },
87
        C4::Context->userenv ? C4::Context->userenv->{branch} : undef
87
    );
88
    );
88
    $template->param(
89
    $template->param(
89
        serverloop => [ $rs->all ],
90
        serverloop => $servers,
90
        opsearch   => "cud-search",
91
        opsearch   => "cud-search",
91
    );
92
    );
92
    output_html_with_http_headers $input, $cookie, $template->output;
93
    output_html_with_http_headers $input, $cookie, $template->output;
93
- 

Return to bug 40481