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-2548
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 |
if ( $tag eq '000' ) { |
2545 |
# We do nothing and let $i be incremented |
|
|
2546 |
} |
2547 |
elsif ( $tag eq '000' ) { |
2546 |
# Force a fake leader even if not provided to avoid crashing |
2548 |
# Force a fake leader even if not provided to avoid crashing |
2547 |
# during decoding MARC record containing UTF-8 characters |
2549 |
# during decoding MARC record containing UTF-8 characters |
2548 |
$record->leader( |
2550 |
$record->leader( |
Lines 2561-2567
sub TransformHtmlToMarc {
Link Here
|
2561 |
# browse subfields for this tag (reason for _code_ match) |
2563 |
# browse subfields for this tag (reason for _code_ match) |
2562 |
while(defined $params[$j] && $params[$j] =~ /_code_/) { |
2564 |
while(defined $params[$j] && $params[$j] =~ /_code_/) { |
2563 |
last unless defined $params[$j+1]; |
2565 |
last unless defined $params[$j+1]; |
2564 |
$j += 2 and next if $tag == $biblionumbertagfield and $cgi->param($params[$j]) eq $biblionumbertagsubfield; |
2566 |
$j += 2 and next |
|
|
2567 |
if $isbiblio and $tag == $biblionumbertagfield and |
2568 |
$cgi->param($params[$j]) eq $biblionumbertagsubfield; |
2565 |
#if next param ne subfield, then it was probably empty |
2569 |
#if next param ne subfield, then it was probably empty |
2566 |
#try next param by incrementing j |
2570 |
#try next param by incrementing j |
2567 |
if($params[$j+1]!~/_subfield_/) {$j++; next; } |
2571 |
if($params[$j+1]!~/_subfield_/) {$j++; next; } |