From oleonard at myacpl.org Tue Mar 4 18:20:31 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 4 Mar 2014 12:20:31 -0500 Subject: [Koha-patches] [PATCH] Bug 11878 - Eliminate use of deprecated jQuery .toggle() method usage Message-ID: <1393953631-10182-1-git-send-email-oleonard@myacpl.org> jQuery's .toggle() method can no longer be used to trigger a pair of specified functions. .toggle() can only be used to change the visibility of an element. This patch fixes a few places in Koha where the deprecated functionality was used. To test, apply the patch and clear your browser cache. - View the system preferences page in the staff client. Clicking a heading ("Appearance" under OPAC preferences, for instance) should collapse that section. Clicking again should expand it. - View the MARC detail page for a record in the OPAC. Clicking the "view plain" link should display the plain MARC view. Clicking the "view labeled" view should return to the original view. Test in both prog and bootstrap themes. --- .../intranet-tmpl/prog/en/js/pages/preferences.js | 14 ++++----- .../bootstrap/en/modules/opac-MARCdetail.tt | 33 +++++++++++--------- .../opac-tmpl/prog/en/modules/opac-MARCdetail.tt | 33 +++++++++++--------- 3 files changed, 43 insertions(+), 37 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js b/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js index 8fe6369..80b8429 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js @@ -95,16 +95,16 @@ $( document ).ready( function () { $("h3").attr("class","expanded").attr("title",MSG_CLICK_TO_EXPAND); var collapsible = $(".collapsed,.expanded"); - $(collapsible).toggle( - function () { + $(collapsible).on("click",function(){ + var panel = $(this).next("div"); + if(panel.is(":visible")){ $(this).addClass("collapsed").removeClass("expanded").attr("title",MSG_CLICK_TO_EXPAND); - $(this).next("div").hide(); - }, - function () { + panel.hide(); + } else { $(this).addClass("expanded").removeClass("collapsed").attr("title",MSG_CLICK_TO_COLLAPSE); - $(this).next("div").show(); + panel.show(); } - ); + }); if ( to_highlight ) { var words = to_highlight.split( ' ' ); diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt index d731c7d..004eecd 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt @@ -182,23 +182,26 @@ $(document).ready(function(){ }); var loaded = 0; - $("#switchview").toggle( - function () { - $(this).text(_("view labeled")); - $("#labeledmarc").hide(); - if(!loaded){ - $("#plainmarc").show().html("
"+_("Loading")+"...
").load("/cgi-bin/koha/opac-showmarc.pl","id=[% biblionumber %]&viewas=html"); - loaded = 1; + var toggle = 0; + $("#switchview").on("click",function(e){ + e.preventDefault(); + if( toggle == 0){ + $(this).text(_("view labeled")); + $("#labeledmarc").hide(); + if(!loaded){ + $("#plainmarc").show().html("
"+_("Loading")+"...
").load("/cgi-bin/koha/opac-showmarc.pl","id=[% biblionumber %]&viewas=html"); + loaded = 1; + } else { + $("#plainmarc").show(); + } + toggle = 1; } else { - $("#plainmarc").show(); + $(this).text(_("view plain")); + $("#labeledmarc").show(); + $("#plainmarc").hide(); + toggle = 0; } - }, - function () { - $(this).text(_("view plain")); - $("#labeledmarc").show(); - $("#plainmarc").hide(); - } - ); + }); }); [% END %] //]]> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt index 6e57f08..ee097fd 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt @@ -33,23 +33,26 @@ $(document).ready(function(){ }); var loaded = 0; - $("#switchview").toggle( - function () { - $(this).text(_("view labeled")); - $("#labeledmarc").hide(); - if(!loaded){ - $("#plainmarc").show().html("
"+_("Loading")+"...
").load("/cgi-bin/koha/opac-showmarc.pl","id=[% biblionumber %]&viewas=html"); - loaded = 1; + var toggle = 0; + $("#switchview").on("click",function(e){ + e.preventDefault(); + if( toggle == 0){ + $(this).text(_("view labeled")); + $("#labeledmarc").hide(); + if(!loaded){ + $("#plainmarc").show().html("
"+_("Loading")+"...
").load("/cgi-bin/koha/opac-showmarc.pl","id=[% biblionumber %]&viewas=html"); + loaded = 1; + } else { + $("#plainmarc").show(); + } + toggle = 1; } else { - $("#plainmarc").show(); + $(this).text(_("view plain")); + $("#labeledmarc").show(); + $("#plainmarc").hide(); + toggle = 0; } - }, - function () { - $(this).text(_("view plain")); - $("#labeledmarc").show(); - $("#plainmarc").hide(); - } - ); + }); }); [% END %] //]]> -- 1.7.9.5 From oleonard at myacpl.org Wed Mar 5 16:58:44 2014 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 5 Mar 2014 10:58:44 -0500 Subject: [Koha-patches] [PATCH] Bug 11866 [Follow-up] Staff side course reserves too restrictive Message-ID: <1394035124-14645-1-git-send-email-oleonard@myacpl.org> This follow-up patch adds a check for the "UseCourseReserves" system preference to the display of the Course reserves menu item in the header. To test, view the "More" menu with the "UseCourseReserves" system preference on and off. The menu item should appear and disappear accordingly. --- .../intranet-tmpl/prog/en/includes/header.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc index a3489c3..30c431b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -22,7 +22,9 @@ [% IF ( CAN_user_serials ) %]
  • Serials
  • [% END %] + [% IF ( UseCourseReserves ) %]
  • Course reserves
  • + [% END %] [% IF ( CAN_user_reports ) %]
  • Reports
  • [% END %] -- 1.7.9.5 From tomascohen at gmail.com Sun Mar 9 22:47:06 2014 From: tomascohen at gmail.com (Tomas Cohen Arazi) Date: Sun, 9 Mar 2014 18:47:06 -0300 Subject: [Koha-patches] [PATCH 1/2] Bug 11912: (regression tests) GetMarcISBN wrongly prepends a space to ISBNs Message-ID: <1394401627-26629-1-git-send-email-tomascohen@gmail.com> This patch makes the tests run in both MARC21 and UNIMARC contexts. It previously run only for MARC21. It mocks what needs to be mocked. To test, run - prove t/db_dependent/Biblio.t => Notice the first ISBN has a space in front of it and those tests fails. Thanks for any feedback To+ --- t/db_dependent/Biblio.t | 355 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 257 insertions(+), 98 deletions(-) diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t index 4725e53..2dd8034 100755 --- a/t/db_dependent/Biblio.t +++ b/t/db_dependent/Biblio.t @@ -1,113 +1,272 @@ #!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. # -# This Koha test module is a stub! -# Add more tests here!!! +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use Test::More tests => 3; +use Test::MockModule; +use Data::Dumper; -use strict; -use warnings; -use Test::More tests => 17; use MARC::Record; -use C4::Biblio; BEGIN { use_ok('C4::Biblio'); } -my $isbn = '0590353403'; -my $title = 'Foundation'; - -my $marc_record=MARC::Record->new; -my $field = MARC::Field->new('020','','','a' => $isbn); -$marc_record->append_fields($field); -my($biblionumber,$biblioitemnumber) = AddBiblio($marc_record,''); -my $data = &GetBiblioData($biblionumber); -is($data->{Title},undef,'Makes sure title field in biblio is empty.'); - -$field = MARC::Field->new('245','','','a' => $title); -$marc_record->append_fields($field); -ModBiblio($marc_record,$biblionumber,''); -$data = &GetBiblioData($biblionumber); -is($data->{title},$title,'uses ModBiblio to add a title to the previously created record and checks that its there.'); -is($data->{isbn},$isbn,'Makes sure the isbn is still there after using ModBiblio.'); - -my $itemdata = &GetBiblioItemData($biblioitemnumber); -is($itemdata->{title},$title,'First test of GetBiblioItemData to get same result of previous two GetBiblioData tests.'); -is($itemdata->{isbn},$isbn,'Second test checking it returns the correct isbn.'); - -my $success = 0; -$field = MARC::Field->new( - 655, ' ', ' ', - 'a' => 'Auction catalogs', - '9' => '1' - ); -eval { +my $dbh = C4::Context->dbh; +# Start transaction +$dbh->{AutoCommit} = 0; +$dbh->{RaiseError} = 1; + +my $global_marcflavour; +# Mocking variables +my $original_preference = C4::Context->can( 'preference' ); +my $context = new Test::MockModule('C4::Context'); + +mock_preference(); +mock_marcfromkohafield(); + +sub run_tests { + + # Undef C4::Biblio::inverted_field_map to avoid problems introduced + # by caching in TransformMarcToKoha + undef $C4::Biblio::inverted_field_map; + + my $marcflavour = shift; + $global_marcflavour = $marcflavour; + + my $isbn = '0590353403'; + my $title = 'Foundation'; + + # Generate a record with just the ISBN + my $marc_record = MARC::Record->new; + my $isbn_field = create_isbn_field( $isbn, $marcflavour ); + $marc_record->append_fields( $isbn_field ); + + # Add the record to the DB + my( $biblionumber, $biblioitemnumber ) = AddBiblio( $marc_record, '' ); + my $data = GetBiblioData( $biblionumber ); + is( $data->{ isbn }, $isbn, + '(GetBiblioData) ISBN correctly retireved.'); + is( $data->{ title }, undef, + '(GetBiblioData) Title field is empty in fresh biblio.'); + + # Add title + my $field = create_title_field( $title, $marcflavour ); + $marc_record->append_fields( $field ); + ModBiblio( $marc_record, $biblionumber ,'' ); + $data = GetBiblioData( $biblionumber ); + is( $data->{ title }, $title, + 'ModBiblio correctly added the title field, and GetBiblioData.'); + is( $data->{ isbn }, $isbn, '(ModBiblio) ISBN is still there after ModBiblio.'); + + my $itemdata = GetBiblioItemData( $biblioitemnumber ); + is( $itemdata->{ title }, $title, + 'First test of GetBiblioItemData to get same result of previous two GetBiblioData tests.'); + is( $itemdata->{ isbn }, $isbn, + 'Second test checking it returns the correct isbn.'); + + my $success = 0; + $field = MARC::Field->new( + 655, ' ', ' ', + 'a' => 'Auction catalogs', + '9' => '1' + ); + eval { + $marc_record->append_fields($field); + $success = ModBiblio($marc_record,$biblionumber,''); + } or do { + diag($@); + $success = 0; + }; + ok($success, "ModBiblio handles authority-linked 655"); + + eval { + $field->delete_subfields('a'); + $marc_record->append_fields($field); + $success = ModBiblio($marc_record,$biblionumber,''); + } or do { + diag($@); + $success = 0; + }; + ok($success, "ModBiblio handles 655 with authority link but no heading"); + + eval { + $field->delete_subfields('9'); + $marc_record->append_fields($field); + $success = ModBiblio($marc_record,$biblionumber,''); + } or do { + diag($@); + $success = 0; + }; + ok($success, "ModBiblio handles 655 with no subfields"); + + ## Testing GetMarcISSN + my $issns; + $issns = GetMarcISSN( $marc_record, $marcflavour ); + is( $issns->[0], undef, + 'GetMarcISSN handles records without the ISSN field (list is empty)' ); + is( scalar @$issns, 0, + 'GetMarcISSN handles records without the ISSN field (count is 0)' ); + # Add an ISSN field + my $issn = '1234-1234'; + $field = create_issn_field( $issn, $marcflavour ); $marc_record->append_fields($field); - $success = ModBiblio($marc_record,$biblionumber,''); -} or do { - diag($@); - $success = 0; -}; -ok($success, "ModBiblio handles authority-linked 655"); + $issns = GetMarcISSN( $marc_record, $marcflavour ); + is( $issns->[0], $issn, + 'GetMarcISSN handles records with a single ISSN field (first element is correct)' ); + is( scalar @$issns, 1, + 'GetMARCISSN handles records with a single ISSN field (count is 1)'); + # Add multiple ISSN field + my @more_issns = qw/1111-1111 2222-2222 3333-3333/; + foreach (@more_issns) { + $field = create_issn_field( $_, $marcflavour ); + $marc_record->append_fields($field); + } + $issns = GetMarcISSN( $marc_record, $marcflavour ); + is( scalar @$issns, 4, + 'GetMARCISSN handles records with multiple ISSN fields (count correct)'); + + ## Testing GetMarcControlnumber + my $controlnumber; + $controlnumber = GetMarcControlnumber( $marc_record, $marcflavour ); + is( $controlnumber, '', 'GetMarcControlnumber handles records without 001' ); -eval { - $field->delete_subfields('a'); + $field = MARC::Field->new( '001', '' ); $marc_record->append_fields($field); - $success = ModBiblio($marc_record,$biblionumber,''); -} or do { - diag($@); - $success = 0; + $controlnumber = GetMarcControlnumber( $marc_record, $marcflavour ); + is( $controlnumber, '', 'GetMarcControlnumber handles records with empty 001' ); + + $field = $marc_record->field('001'); + $field->update('123456789X'); + $controlnumber = GetMarcControlnumber( $marc_record, $marcflavour ); + is( $controlnumber, '123456789X', 'GetMarcControlnumber handles records with 001' ); + + ## Testing GetMarcISBN + my $record_for_isbn = MARC::Record->new(); + my $isbns = GetMarcISBN( $record_for_isbn, $marcflavour ); + is( scalar @$isbns, 0, '(GetMarcISBN) The record contains no ISBN'); + + # We add one ISBN + $isbn_field = create_isbn_field( $isbn, $marcflavour ); + $record_for_isbn->append_fields( $isbn_field ); + $isbns = GetMarcISBN( $record_for_isbn, $marcflavour ); + is( scalar @$isbns, 1, '(GetMarcISBN) The record contains one ISBN'); + is( $isbns->[0]->{ marcisbn }, $isbn, '(GetMarcISBN) The record contains our ISBN'); + + # We add 3 more ISBNs + $record_for_isbn = MARC::Record->new(); + my @more_isbns = qw/1111111111 2222222222 3333333333 444444444/; + foreach (@more_isbns) { + $field = create_isbn_field( $_, $marcflavour ); + $record_for_isbn->append_fields($field); + } + $isbns = GetMarcISBN( $record_for_isbn, $marcflavour ); + is( scalar @$isbns, 4, '(GetMarcISBN) The record contains 4 ISBNs'); + for my $i (0 .. $#more_isbns) { + is( $isbns->[$i]->{ marcisbn }, $more_isbns[$i], + "(GetMarcISBN) Corretly retrieves ISBN #". ($i + 1)); + } + +} + +sub mock_preference { + + $context->mock( 'preference', sub { + my ( $self, $pref ) = @_; + if ( $pref eq 'marcflavour' ) { + return $global_marcflavour; + } else { + &$original_preference(@_); + } + }); + +} + +sub mock_marcfromkohafield { + + $context->mock('marcfromkohafield', + sub { + my ( $self ) = shift; + + if ( $global_marcflavour eq 'MARC21' ) { + + return { + '' => { + 'biblio.title' => [ '245', 'a' ], + 'biblio.biblionumber' => [ '999', 'c' ], + 'biblioitems.isbn' => [ '020', 'a' ], + 'biblioitems.issn' => [ '022', 'a' ], + 'biblioitems.biblioitemnumber' => [ '999', 'd' ] + } + }; + } elsif ( $global_marcflavour eq 'UNIMARC' ) { + + return { + '' => { + 'biblio.title' => [ '200', 'a' ], + 'biblio.biblionumber' => [ '999', 'c' ], + 'biblioitems.isbn' => [ '010', 'a' ], + 'biblioitems.issn' => [ '011', 'a' ], + 'biblioitems.biblioitemnumber' => [ '090', 'a' ] + } + }; + } + }); +} + +sub create_title_field { + my ( $title, $marcflavour ) = @_; + + my $title_field = ( $marcflavour eq 'UNIMARC' ) ? '200' : '245'; + my $field = MARC::Field->new( $title_field,'','','a' => $title); + + return $field; +} + +sub create_isbn_field { + my ( $isbn, $marcflavour ) = @_; + + my $isbn_field = ( $marcflavour eq 'UNIMARC' ) ? '010' : '020'; + my $field = MARC::Field->new( $isbn_field,'','','a' => $isbn); + + return $field; +} + +sub create_issn_field { + my ( $issn, $marcflavour ) = @_; + + my $issn_field = ( $marcflavour eq 'UNIMARC' ) ? '011' : '022'; + my $field = MARC::Field->new( $issn_field,'','','a' => $issn); + + return $field; +} + +subtest 'MARC21' => sub { + plan tests => 25; + run_tests('MARC21'); + $dbh->rollback; }; -ok($success, "ModBiblio handles 655 with authority link but no heading"); -eval { - $field->delete_subfields('9'); - $marc_record->append_fields($field); - $success = ModBiblio($marc_record,$biblionumber,''); -} or do { - diag($@); - $success = 0; +subtest 'UNIMARC' => sub { + plan tests => 25; + run_tests('UNIMARC'); + $dbh->rollback; }; -ok($success, "ModBiblio handles 655 with no subfields"); - -# Testing GetMarcISSN -my $issns; -$issns = GetMarcISSN( $marc_record, 'MARC21' ); -is( $issns->[0], undef, - 'GetMarcISSN handles records without 022 (list is empty)' ); -is( scalar @$issns, 0, 'GetMarcISSN handles records without 022 (number of elements correct)' ); - -my $issn = '1234-1234'; -$field = MARC::Field->new( '022', '', '', 'a', => $issn ); -$marc_record->append_fields($field); -$issns = GetMarcISSN( $marc_record, 'MARC21' ); -is( $issns->[0], $issn, - 'GetMarcISSN handles records with single 022 (first element is correct)' ); -is( scalar @$issns, 1, 'GetMARCISSN handles records with single 022 (number of elements correct)' -); - -my @more_issns = qw/1111-1111 2222-2222 3333-3333/; -foreach (@more_issns) { - $field = MARC::Field->new( '022', '', '', 'a', => $_ ); - $marc_record->append_fields($field); -} -$issns = GetMarcISSN( $marc_record, 'MARC21' ); -is( scalar @$issns, 4, 'GetMARCISSN handles records with multiple 022 (number of elements correct)' -); - -# Testing GetMarcControlnumber -my $controlnumber; -$controlnumber = GetMarcControlnumber( $marc_record, 'MARC21' ); -is( $controlnumber, '', 'GetMarcControlnumber handles records without 001' ); - -$field = MARC::Field->new( '001', '' ); -$marc_record->append_fields($field); -$controlnumber = GetMarcControlnumber( $marc_record, 'MARC21' ); -is( $controlnumber, '', 'GetMarcControlnumber handles records with empty 001' ); - -$field = $marc_record->field('001'); -$field->update('123456789X'); -$controlnumber = GetMarcControlnumber( $marc_record, 'MARC21' ); -is( $controlnumber, '123456789X', 'GetMarcControlnumber handles records with 001' ); - -# clean up after ourselves -DelBiblio($biblionumber); + + +1; -- 1.8.3.2 From tomascohen at gmail.com Sun Mar 9 22:47:07 2014 From: tomascohen at gmail.com (Tomas Cohen Arazi) Date: Sun, 9 Mar 2014 18:47:07 -0300 Subject: [Koha-patches] [PATCH 2/2] Bug 11912: GetMarcISBN wrongly prepends a space to ISBNs In-Reply-To: <1394401627-26629-1-git-send-email-tomascohen@gmail.com> References: <1394401627-26629-1-git-send-email-tomascohen@gmail.com> Message-ID: <1394401627-26629-2-git-send-email-tomascohen@gmail.com> This patch makes the logic inside GetMarcISBN simpler and fixes the issue. To test: - Run the regression tests: prove -v t/db_dependent/Biblio.t => FAIL - Apply the patch - Run: prove -v t/db_dependent/Biblio.t => SUCCESS - Verify that opac-detail.pl and catalogue/detail.pl look as usual regarding ISBN - Sign off Regards To+ Sponsored-by: Universidad Nacional de Cordoba --- C4/Biblio.pm | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 330951d..a34e5b6 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1690,25 +1690,15 @@ sub GetMarcISBN { $scope = '020'; } my @marcisbns; - my $isbn = ""; - my $tag = ""; my $marcisbn; foreach my $field ( $record->field($scope) ) { - my $value = $field->as_string(); + my $isbn = $field->as_string(); if ( $isbn ne "" ) { $marcisbn = { marcisbn => $isbn, }; push @marcisbns, $marcisbn; - $isbn = $value; - } - if ( $isbn ne $value ) { - $isbn = $isbn . " " . $value; } } - if ($isbn) { - $marcisbn = { marcisbn => $isbn }; - push @marcisbns, $marcisbn; #load last tag into array - } return \@marcisbns; } # end GetMarcISBN -- 1.8.3.2 From tomascohen at gmail.com Mon Mar 10 16:11:12 2014 From: tomascohen at gmail.com (Tomas Cohen Arazi) Date: Mon, 10 Mar 2014 12:11:12 -0300 Subject: [Koha-patches] [PATCH] Bug 11912: (refactoring followup) GetMarcISBN should implement its advertised API Message-ID: <1394464272-5045-1-git-send-email-tomascohen@gmail.com> 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 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-sendshelf.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tt | 2 +- t/db_dependent/Biblio.t | 1 - 5 files changed, 5 insertions(+), 7 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() {