Lines 757-770
sub custom_cover_image_url {
Link Here
|
757 |
my $url = C4::Context->preference('CustomCoverImagesURL'); |
757 |
my $url = C4::Context->preference('CustomCoverImagesURL'); |
758 |
if ( $url =~ m|{isbn}| ) { |
758 |
if ( $url =~ m|{isbn}| ) { |
759 |
my $isbn = $self->biblioitem->isbn; |
759 |
my $isbn = $self->biblioitem->isbn; |
|
|
760 |
return unless $isbn; |
760 |
$url =~ s|{isbn}|$isbn|g; |
761 |
$url =~ s|{isbn}|$isbn|g; |
761 |
} |
762 |
} |
762 |
if ( $url =~ m|{normalized_isbn}| ) { |
763 |
if ( $url =~ m|{normalized_isbn}| ) { |
763 |
my $normalized_isbn = C4::Koha::GetNormalizedISBN($self->biblioitem->isbn); |
764 |
my $normalized_isbn = C4::Koha::GetNormalizedISBN($self->biblioitem->isbn); |
|
|
765 |
return unless $normalized_isbn; |
764 |
$url =~ s|{normalized_isbn}|$normalized_isbn|g; |
766 |
$url =~ s|{normalized_isbn}|$normalized_isbn|g; |
765 |
} |
767 |
} |
766 |
if ( $url =~ m|{issn}| ) { |
768 |
if ( $url =~ m|{issn}| ) { |
767 |
my $issn = $self->biblioitem->issn; |
769 |
my $issn = $self->biblioitem->issn; |
|
|
770 |
return unless $issn; |
768 |
$url =~ s|{issn}|$issn|g; |
771 |
$url =~ s|{issn}|$issn|g; |
769 |
} |
772 |
} |
770 |
|
773 |
|
Lines 774-779
sub custom_cover_image_url {
Link Here
|
774 |
my $subfield = $+{subfield}; |
777 |
my $subfield = $+{subfield}; |
775 |
my $marc_record = $self->metadata->record; |
778 |
my $marc_record = $self->metadata->record; |
776 |
my $value = $marc_record->subfield($field, $subfield); |
779 |
my $value = $marc_record->subfield($field, $subfield); |
|
|
780 |
return unless $value; |
777 |
$url =~ s|$re|$value|; |
781 |
$url =~ s|$re|$value|; |
778 |
} |
782 |
} |
779 |
|
783 |
|