use C4::Output;
use C4::Record;
use C4::Ris;
-
use Koha::CsvProfiles;
+use Koha::RecordProcessor;
use utf8;
my $query = new CGI;
# Other formats
} else {
+ my $record_processor = Koha::RecordProcessor->new({
+ filters => 'ViewPolicy'
+ });
foreach my $biblio (@bibs) {
- my $record = GetMarcBiblio($biblio, 1);
+ my $record = GetMarcBiblio({
+ biblionumber => $biblio,
+ embed_items => 1 });
+ my $framework = &GetFrameworkCode( $biblio );
+ $record_processor->options({
+ interface => 'opac',
+ frameworkcode => $framework
+ });
+ $record_processor->process($record);
+
next unless $record;
if ($format eq 'iso2709') {
$output .= marc2bibtex($record, $biblio);
}
elsif ( $format eq 'isbd' ) {
- $output .= GetISBDView($biblio, "opac");
+ my $framework = GetFrameworkCode( $biblio );
+ $output .= GetISBDView({
+ 'record' => $record,
+ 'template' => 'opac',
+ 'framework' => $framework,
+ });
$extension = "txt";
$type = "text/plain";
}
print $output;
} else {
- $template->param(csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc' }) ]);
+ $template->param(csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc', used_for => 'export_records' }) ]);
$template->param(bib_list => $bib_list);
output_html_with_http_headers $query, $cookie, $template->output;
}