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

(-)a/cataloguing/editor.pl (-1 / +1 lines)
Lines 78-84 my $frameworks = Koha::BiblioFrameworks->search( {}, { order_by => ['frameworkte Link Here
78
$template->{VARS}->{frameworks} = $frameworks;
78
$template->{VARS}->{frameworks} = $frameworks;
79
79
80
$template->param(
80
$template->param(
81
    z3950_servers => Koha::Z3950Servers->search(
81
    z3950_servers => Koha::Z3950Servers->search_with_library_limits(
82
        { recordtype => { '!=' => 'authority' } },
82
        { recordtype => { '!=' => 'authority' } },
83
        { order_by   => [ 'rank', 'servername' ] },
83
        { order_by   => [ 'rank', 'servername' ] },
84
    )
84
    )
(-)a/cataloguing/z3950_auth_search.pl (-5 / +9 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
        },
102
    );
108
    );
103
    $sth->execute();
104
    my $serverloop = $sth->fetchall_arrayref( {} );
105
    $template->param(
109
    $template->param(
106
        serverloop => $serverloop,
110
        serverloop => $servers,
107
        opsearch   => "cud-search",
111
        opsearch   => "cud-search",
108
        index      => $index,
112
        index      => $index,
109
    );
113
    );
(-)a/cataloguing/z3950_search.pl (-6 / +5 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
    );
87
    );
88
    $template->param(
88
    $template->param(
89
        serverloop => [ $rs->all ],
89
        serverloop => $servers,
90
        opsearch   => "cud-search",
90
        opsearch   => "cud-search",
91
    );
91
    );
92
    output_html_with_http_headers $input, $cookie, $template->output;
92
    output_html_with_http_headers $input, $cookie, $template->output;
93
- 

Return to bug 40841