From 68dfb9d1da7fd6201e98189557c00893fa5d68ef Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 10 Mar 2014 11:52:19 -0300 Subject: [PATCH] Bug 11912: (refactoring followup) GetMarcISBN should implement its advertised API The current implementation of GetMarcISBN contradicts the documented API. It currently returns an array of hashes with only one key (marcisbn) which doesn't add any value to it. I chose to fix GetMarcISBN to honour the API instead of changing the docs, because it seems a really silly change. To test: - Run: prove t/db_dependent/Biblio.t => SUCCESS - catalogue/detail.pl should correctly show ISBNs. - opac/opac-detail.pl should correctly show ISBNs in both prog and bootstrap. - opac-opac-sendshelf.pl should correctly show ISBNs in the email. - Sign off :-D Edit: forgot to git add some templates. Regards To+ Sponsored-by: Universidad Nacional de Cordoba --- C4/Biblio.pm | 5 ++--- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendshelf.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tt | 2 +- t/db_dependent/Biblio.t | 1 - 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index a34e5b6..61e4c3b 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1689,13 +1689,12 @@ sub GetMarcISBN { } else { # assume marc21 if not unimarc $scope = '020'; } + my @marcisbns; - my $marcisbn; foreach my $field ( $record->field($scope) ) { my $isbn = $field->as_string(); if ( $isbn ne "" ) { - $marcisbn = { marcisbn => $isbn, }; - push @marcisbns, $marcisbn; + push @marcisbns, $isbn; } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 1e1fcd2..03e322d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -416,7 +416,7 @@ function verify_images() {