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

(-)a/cataloguing/editor.pl (-8 / +9 lines)
Lines 30-35 use Koha::Database; Link Here
30
use Koha::MarcSubfieldStructures;
30
use Koha::MarcSubfieldStructures;
31
use Koha::BiblioFrameworks;
31
use Koha::BiblioFrameworks;
32
use Koha::KeyboardShortcuts;
32
use Koha::KeyboardShortcuts;
33
use Koha::Z3950Servers;
33
34
34
my $input = CGI->new;
35
my $input = CGI->new;
35
36
Lines 76-89 $template->{VARS}->{authtags} = $authtags; Link Here
76
my $frameworks = Koha::BiblioFrameworks->search( {}, { order_by => ['frameworktext'] } );
77
my $frameworks = Koha::BiblioFrameworks->search( {}, { order_by => ['frameworktext'] } );
77
$template->{VARS}->{frameworks} = $frameworks;
78
$template->{VARS}->{frameworks} = $frameworks;
78
79
79
# Z39.50 servers
80
$template->param(
80
my $dbh = C4::Context->dbh;
81
    z3950_servers => Koha::Z3950Servers->search_with_library_limits(
81
$template->{VARS}->{z3950_servers} = $dbh->selectall_arrayref(
82
        {
82
    q{
83
            recordtype => { '!=' => 'authority' },
83
    SELECT * FROM z3950servers
84
            servertype => 'zed'
84
    WHERE recordtype != 'authority' AND servertype = 'zed'
85
        },
85
    ORDER BY `rank`,servername
86
        { order_by => [ 'rank', 'servername' ] },
86
}, { Slice => {} }
87
    )
87
);
88
);
88
89
89
output_html_with_http_headers $input, $cookie, $template->output;
90
output_html_with_http_headers $input, $cookie, $template->output;
(-)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