Lines 424-430
sub _handle_one_result {
Link Here
|
424 |
sub _add_rowdata { |
424 |
sub _add_rowdata { |
425 |
my ($rowref, $marcrecord)=@_; |
425 |
my ($rowref, $marcrecord)=@_; |
426 |
if(C4::Context->preference("marcflavour") ne 'UNIMARC') { #MARC21, NORMARC |
426 |
if(C4::Context->preference("marcflavour") ne 'UNIMARC') { #MARC21, NORMARC |
427 |
$rowref->{isbn} = _isbn_cleanup($marcrecord->subfield('020','a')||''); |
427 |
$rowref->{isbn}= _isbn_show($marcrecord, '020'); |
428 |
$rowref->{title}= $marcrecord->subfield('245','a')||''; |
428 |
$rowref->{title}= $marcrecord->subfield('245','a')||''; |
429 |
$rowref->{author}= $marcrecord->subfield('100','a')||''; |
429 |
$rowref->{author}= $marcrecord->subfield('100','a')||''; |
430 |
$rowref->{date}= $marcrecord->subfield('260','c')||''; |
430 |
$rowref->{date}= $marcrecord->subfield('260','c')||''; |
Lines 432-438
sub _add_rowdata {
Link Here
|
432 |
$rowref->{lccn}= $marcrecord->subfield('050','a')||''; |
432 |
$rowref->{lccn}= $marcrecord->subfield('050','a')||''; |
433 |
} |
433 |
} |
434 |
else { #UNIMARC |
434 |
else { #UNIMARC |
435 |
$rowref->{isbn}= _isbn_cleanup($marcrecord->subfield('010','a')||''); |
435 |
$rowref->{isbn}= _isbn_show($marcrecord, '010'); |
436 |
$rowref->{title}= $marcrecord->subfield('200','a')||''; |
436 |
$rowref->{title}= $marcrecord->subfield('200','a')||''; |
437 |
$rowref->{author}= $marcrecord->subfield('200','f')||''; |
437 |
$rowref->{author}= $marcrecord->subfield('200','f')||''; |
438 |
$rowref->{date}= $marcrecord->subfield('210','d')||''; |
438 |
$rowref->{date}= $marcrecord->subfield('210','d')||''; |
Lines 442-452
sub _add_rowdata {
Link Here
|
442 |
return $rowref; |
442 |
return $rowref; |
443 |
} |
443 |
} |
444 |
|
444 |
|
445 |
sub _isbn_cleanup { |
445 |
sub _isbn_show { |
446 |
my $isbn= shift; |
446 |
my ($record, $fieldno)= @_; #both marc21 and unimarc possible |
447 |
$isbn=~ s/ |-|\.//g; |
447 |
my $isbn= ''; |
448 |
$isbn=~ s/\|/ \| /g; |
448 |
foreach my $f ( $record->field($fieldno) ) { |
449 |
$isbn=~ s/\(/ \(/g; |
449 |
my $a= $f->subfield('a'); |
|
|
450 |
$a =~ s/ |-|\.//g; |
451 |
$a =~ s/\|/ \| /g; |
452 |
$a =~ s/\(/ \(/g; |
453 |
$isbn= $isbn? ($isbn.' | '. $a): $a; |
454 |
} |
450 |
return $isbn; |
455 |
return $isbn; |
451 |
} |
456 |
} |
452 |
|
457 |
|
453 |
- |
|
|