Lines 247-257
sub XSLTParse4Display {
Link Here
|
247 |
|
247 |
|
248 |
$variables ||= {}; |
248 |
$variables ||= {}; |
249 |
if (C4::Context->preference('OPACShowOpenURL')) { |
249 |
if (C4::Context->preference('OPACShowOpenURL')) { |
250 |
my $biblio_object = Koha::Biblios->find($biblionumber); |
250 |
my @biblio_itemtypes; |
251 |
my $biblio = $biblio_object->biblioitem->unblessed; |
251 |
my $biblio = Koha::Biblios->find($biblionumber); |
|
|
252 |
if (C4::Context->preference('item-level_itypes')) { |
253 |
@biblio_itemtypes = $biblio->items->get_column("itype"); |
254 |
} else { |
255 |
push @biblio_itemtypes, $biblio->biblioitem->itemtype; |
256 |
} |
252 |
my @itypes = split( /\s/, C4::Context->preference('OPACOpenURLItemTypes') ); |
257 |
my @itypes = split( /\s/, C4::Context->preference('OPACOpenURLItemTypes') ); |
253 |
if (grep /^$biblio->{itemtype}$/, @itypes) { |
258 |
my %original = (); |
254 |
$variables->{OpenURLResolverURL} = $biblio_object->get_openurl; |
259 |
map { $original{$_} = 1 } @biblio_itemtypes; |
|
|
260 |
if ( grep { $original{$_} } @itypes ) { |
261 |
$variables->{OpenURLResolverURL} = $biblio->get_openurl; |
255 |
} |
262 |
} |
256 |
} |
263 |
} |
257 |
my $varxml = "<variables>\n"; |
264 |
my $varxml = "<variables>\n"; |
258 |
- |
|
|