@@ -, +, @@ for better transparency --- Koha/MarcEditor.pm | 10 +++++----- authorities/authorities.pl | 4 ++-- cataloguing/addbiblio.pl | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) --- a/Koha/MarcEditor.pm +++ a/Koha/MarcEditor.pm @@ -71,14 +71,14 @@ sub new { =head3 build_tabs - $editor->build_tabs($template, $record, $encoding); + my @tabs = $editor->build_tabs($record, $encoding); -Builds tab data in the template +Builds tab data for the template =cut sub build_tabs { - my ( $self, $template, $record, $encoding ) = @_; + my ( $self, $record, $encoding ) = @_; # fill arrays my @loop_data = (); @@ -90,7 +90,7 @@ sub build_tabs { my %seen; my @tab_data; # all tags to display my $max_num_tab=-1; - my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber" ); + my ( $itemtag, $itemsubfield ) = C4::Biblio::GetMarcFromKohaField( "items.itemnumber" ); if (defined $self->{used_tags}) { foreach my $used ( @{$self->{used_tags}} ) { @@ -287,7 +287,7 @@ sub build_tabs { }; } } - $template->param( BIG_LOOP => \@BIG_LOOP ); + return \@BIG_LOOP; } =head2 Internal methods --- a/authorities/authorities.pl +++ a/authorities/authorities.pl @@ -176,7 +176,7 @@ if ($op eq "add") { exit; } else { # it may be a duplicate, warn the user and do nothing - $editor->build_tabs($template, $record, $encoding); + $template->param( BIG_LOOP => $editor->build_tabs($record, $encoding) ); $template->param(authid =>$authid, duplicateauthid => $duplicateauthid, duplicateauthvalue => $duplicateauthvalue->{'authorized'}->[0]->{'heading'}, @@ -196,7 +196,7 @@ if ($op eq "duplicate") { $authid = ""; } - $editor->build_tabs ($template, $record, $encoding); + $template->param( BIG_LOOP => $editor->build_tabs($record, $encoding) ); $template->param(oldauthtypetagfield=>$oldauthtypetagfield, oldauthtypetagsubfield=>$oldauthtypetagsubfield, oldauthnumtagfield=>$oldauthnumtagfield, oldauthnumtagsubfield=>$oldauthnumtagsubfield, authid => $authid , authtypecode=>$authtypecode, ); --- a/cataloguing/addbiblio.pl +++ a/cataloguing/addbiblio.pl @@ -408,7 +408,7 @@ if ( $op eq "addbiblio" ) { } } else { # it may be a duplicate, warn the user and do nothing - $editor->build_tabs($template, $record, $encoding); + $template->param( BIG_LOOP => $editor->build_tabs($record, $encoding) ); $template->param( biblionumber => $biblionumber, biblioitemnumber => $biblioitemnumber, @@ -455,7 +455,7 @@ elsif ( $op eq "delete" ) { $record = $urecord; }; } - $editor->build_tabs( $template, $record, $encoding ); + $template->param( BIG_LOOP => $editor->build_tabs( $record, $encoding ) ); $template->param( biblionumber => $biblionumber, biblionumbertagfield => $biblionumbertagfield, --