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 <nicolas.legrand@bulac.fr> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
da7dd4ed8c
commit
c4900dc448
1 changed files with 1 additions and 11 deletions
12
C4/Biblio.pm
12
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue