Bug 30466: Convert serials pages tabs to Bootstrap
[koha-ffzg.git] / opac / opac-sendshelf.pl
index c8f9ed4..4b33d8e 100755 (executable)
@@ -26,9 +26,7 @@ use Try::Tiny qw( catch try );
 
 use C4::Auth qw( get_template_and_user );
 use C4::Biblio qw(
-    GetBiblioData
     GetFrameworkCode
-    GetMarcAuthors
     GetMarcBiblio
     GetMarcISBN
     GetMarcSubjects
@@ -62,8 +60,7 @@ my $dbh          = C4::Context->dbh;
 
 my $shelf = Koha::Virtualshelves->find( $shelfid );
 if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) {
-
-if ( $email ) {
+  if ( $email ) {
     my $comment    = $query->param('comment');
 
     my ( $template2, $borrowernumber, $cookie ) = get_template_and_user(
@@ -86,17 +83,17 @@ if ( $email ) {
 
     while ( my $content = $contents->next ) {
         my $biblionumber = $content->biblionumber;
+        my $biblio       = Koha::Biblios->find( $biblionumber ) or next;
+        my $dat          = $biblio->unblessed;
         my $record           = GetMarcBiblio({
             biblionumber => $biblionumber,
             embed_items  => 1,
             opac         => 1,
             borcat       => $borcat });
         next unless $record;
-        my $biblio           = Koha::Biblios->find( $biblionumber );
         my $fw               = GetFrameworkCode($biblionumber);
-        my $dat              = GetBiblioData($biblionumber);
 
-        my $marcauthorsarray = $biblio->get_authors_from_MARC;
+        my $marcauthorsarray = $biblio->get_marc_authors;
         my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
 
         my @items = GetItemsInfo( $biblionumber );
@@ -181,14 +178,12 @@ END_OF_BODY
     );
     output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
 
-
-}else{
+  } else {
     $template->param( shelfid => $shelfid,
                       url     => "/cgi-bin/koha/opac-sendshelf.pl",
                     );
     output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
-}
-
+  }
 } else {
     $template->param( invalidlist => 1,
                       url     => "/cgi-bin/koha/opac-sendshelf.pl",