diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index d969215c61..93ef3efb68 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -823,7 +823,8 @@ $is_a_modif = 0; if ($biblionumber) { $is_a_modif = 1; - $template->param( title => $record->title(), ); + my $title = C4::Context->preference('marcflavour') eq "UNIMARC" ? $record->subfield('200', 'a') : $record->title; + $template->param( title => $title ); # if it's a modif, retrieve bibli and biblioitem numbers for the future modification of old-DB. ( $biblionumbertagfield, $biblionumbertagsubfield ) = @@ -912,8 +913,10 @@ if ( $op eq "addbiblio" ) { done =>1, popup =>1 ); - $template->param( title => $record->subfield('200',"a") ) if ($record ne "-1" && C4::Context->preference('marcflavour') =~/unimarc/i); - $template->param( title => $record->title() ) if ($record ne "-1" && C4::Context->preference('marcflavour') eq "usmarc"); + if ( $record ne '-1' ) { + my $title = C4::Context->preference('marcflavour') eq "UNIMARC" ? $record->subfield('200', 'a') : $record->title; + $template->param( title => $title ); + } $template->param( popup => $mode, itemtype => $frameworkcode, @@ -983,7 +986,10 @@ elsif ( $op eq "delete" ) { ); } -$template->param( title => $record->title() ) if ( $record ne "-1" ); +if ( $record ne '-1' ) { + my $title = C4::Context->preference('marcflavour') eq "UNIMARC" ? $record->subfield('200', 'a') : $record->title; + $template->param( title => $title ); +} $template->param( popup => $mode, frameworkcode => $frameworkcode, diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 9c7fb3fe50..d127179f92 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -847,7 +847,6 @@ foreach my $tag ( keys %{$tagslib}){ @loop_data = sort {$a->{subfield} cmp $b->{subfield} } @loop_data; # what's the next op ? it's what we are not in : an add if we're editing, otherwise, and edit. -$template->param( title => $record->title() ) if ($record ne "-1"); $template->param( biblionumber => $biblionumber, title => $oldrecord->{title},