use C4::Context;
use C4::Breeding;
use C4::Koha;
-use C4::Bookseller qw/ GetBookSellerFromId /;
+
+use Koha::Acquisition::Bookseller;
my $input = new CGI;
-my $dbh = C4::Context->dbh;
my $biblionumber = $input->param('biblionumber')||0;
my $frameworkcode = $input->param('frameworkcode')||'';
my $title = $input->param('title');
push @frameworkcodeloop, \%row;
}
-my $vendor = GetBookSellerFromId($booksellerid);
+my $vendor = Koha::Acquisition::Bookseller->fetch({ id => $booksellerid });
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
- template_name => "acqui/z3950_search.tmpl",
+ template_name => "acqui/z3950_search.tt",
query => $input,
type => "intranet",
- authnotrequired => 1,
flagsrequired => { acquisition => 'order_manage' },
}
);
);
if ( $op ne "do_search" ) {
- my $sth = $dbh->prepare("select id,host,name,checked from z3950servers order by host");
- $sth->execute();
- my $serverloop = $sth->fetchall_arrayref( {} );
+ my $schema = Koha::Database->new()->schema();
+ my $rs = $schema->resultset('Z3950server')->search(
+ {
+ recordtype => 'biblio',
+ servertype => ['zed', 'sru'],
+ },
+ { result_class => 'DBIx::Class::ResultClass::HashRefInflator' },
+ );
$template->param(
- serverloop => $serverloop,
+ serverloop => [ $rs->all ],
opsearch => "search",
);
output_html_with_http_headers $input, $cookie, $template->output;