From eef3a2b36c31d3e3ed5cfb71fd40ccb6325cfda8 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Sun, 9 Mar 2014 18:39:11 -0300 Subject: [PATCH] Bug 11912: fix problem where GetMarcISBN wrongly prepends a space to ISBNs 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 Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Nicolas Legrand Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton (cherry picked from commit c4900dc448aa029749ab27f98b59d1be6eb8bb14) Signed-off-by: Fridolin Somers Signed-off-by: Kyle M Hall (cherry picked from commit d2d5600cdc8d629a77e3eaad42b24ffdd3b1b59e) --- C4/Biblio.pm | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 38dda062cf..4f1cf91585 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1640,25 +1640,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 -- 2.39.5