use C4::Output;
use C4::Charset qw(StripNonXmlChars);
+use Koha::Patrons;
+
+use Koha::ItemTypes;
my $query = new CGI;
query => $query,
type => "opac",
authnotrequired => 0,
- flagsrequired => { borrow => 1 },
debug => 1,
}
);
-# get borrower information ....
-my ( $borr ) = GetMemberDetails( $borrowernumber );
+my $borr = Koha::Patrons->find( $borrowernumber )->unblessed;
$template->param(%{$borr});
-my $itemtypes = GetItemTypes();
+my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } };
# get the record
my $order = $query->param('order') || '';
foreach my $issue ( @{$issues} ) {
$issue->{normalized_isbn} = GetNormalizedISBN( $issue->{isbn} );
if ( $issue->{$itype_attribute} ) {
- $issue->{description} =
- $itemtypes->{ $issue->{$itype_attribute} }->{description};
+ $issue->{translated_description} =
+ $itemtypes->{ $issue->{$itype_attribute} }->{translated_description};
$issue->{imageurl} =
getitemtypeimagelocation( 'opac',
$itemtypes->{ $issue->{$itype_attribute} }->{imageurl} );
}
- if ( $issue->{marcxml} ) {
- my $marcxml = StripNonXmlChars( $issue->{marcxml} );
+ my $marcxml = C4::Biblio::GetXmlBiblio( $issue->{biblionumber} );
+ if ( $marcxml ) {
+ $marcxml = StripNonXmlChars( $marcxml );
my $marc_rec =
MARC::Record::new_from_xml( $marcxml, 'utf8',
C4::Context->preference('marcflavour') );
$issue->{subtitle} =
GetRecordValue( 'subtitle', $marc_rec, $issue->{frameworkcode} );
+ $issue->{normalized_upc} = GetNormalizedUPC( $marc_rec, C4::Context->preference('marcflavour') );
}
# My Summary HTML
if ($opac_summary_html) {
OPACMySummaryHTML => $opac_summary_html ? 1 : 0,
);
-output_html_with_http_headers $query, $cookie, $template->output;
+output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };