|
Lines 2496-2502
sub _default_ind_to_space {
Link Here
|
| 2496 |
=cut |
2496 |
=cut |
| 2497 |
|
2497 |
|
| 2498 |
sub TransformHtmlToMarc { |
2498 |
sub TransformHtmlToMarc { |
| 2499 |
my $cgi = shift; |
2499 |
my ($cgi, $isbiblio) = @_; |
| 2500 |
|
2500 |
|
| 2501 |
my @params = $cgi->param(); |
2501 |
my @params = $cgi->param(); |
| 2502 |
|
2502 |
|
|
Lines 2541-2547
sub TransformHtmlToMarc {
Link Here
|
| 2541 |
|
2541 |
|
| 2542 |
if ( $tag < 10 ) { # no code for theses fields |
2542 |
if ( $tag < 10 ) { # no code for theses fields |
| 2543 |
# in MARC editor, 000 contains the leader. |
2543 |
# in MARC editor, 000 contains the leader. |
| 2544 |
next if $tag == $biblionumbertagfield; |
2544 |
if ( $isbiblio && $tag == $biblionumbertagfield ) { |
|
|
2545 |
$i += 4; |
| 2546 |
next; |
| 2547 |
} |
| 2545 |
if ( $tag eq '000' ) { |
2548 |
if ( $tag eq '000' ) { |
| 2546 |
# Force a fake leader even if not provided to avoid crashing |
2549 |
# Force a fake leader even if not provided to avoid crashing |
| 2547 |
# during decoding MARC record containing UTF-8 characters |
2550 |
# during decoding MARC record containing UTF-8 characters |
|
Lines 2561-2567
sub TransformHtmlToMarc {
Link Here
|
| 2561 |
# browse subfields for this tag (reason for _code_ match) |
2564 |
# browse subfields for this tag (reason for _code_ match) |
| 2562 |
while(defined $params[$j] && $params[$j] =~ /_code_/) { |
2565 |
while(defined $params[$j] && $params[$j] =~ /_code_/) { |
| 2563 |
last unless defined $params[$j+1]; |
2566 |
last unless defined $params[$j+1]; |
| 2564 |
$j += 2 and next if $tag == $biblionumbertagfield and $cgi->param($params[$j]) eq $biblionumbertagsubfield; |
2567 |
$j += 2 and next |
|
|
2568 |
if $isbiblio and $tag == $biblionumbertagfield and |
| 2569 |
$cgi->param($params[$j]) eq $biblionumbertagsubfield; |
| 2565 |
#if next param ne subfield, then it was probably empty |
2570 |
#if next param ne subfield, then it was probably empty |
| 2566 |
#try next param by incrementing j |
2571 |
#try next param by incrementing j |
| 2567 |
if($params[$j+1]!~/_subfield_/) {$j++; next; } |
2572 |
if($params[$j+1]!~/_subfield_/) {$j++; next; } |