Bug 6050 Make calls to GetItemsInfo consistent
[koha.git] / opac / opac-sendbasket.pl
index 6213965..df1b4c5 100755 (executable)
@@ -20,6 +20,7 @@ use warnings;
 
 use CGI;
 use Encode qw(encode);
+use Carp;
 
 use Mail::Sendmail;
 use MIME::QuotedPrint;
@@ -80,7 +81,7 @@ if ( $email_add ) {
         my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
         my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
 
-        my @items = &GetItemsInfo( $biblionumber, 'opac' );
+        my @items = GetItemsInfo( $biblionumber );
 
         my $hasauthors = 0;
         if($dat->{'author'} || @$marcauthorsarray) {
@@ -170,7 +171,7 @@ END_OF_BODY
     }
     else {
         # do something if it doesnt work....
-        warn "Error sending mail: $Mail::Sendmail::error \n";
+        carp "Error sending mail: $Mail::Sendmail::error \n";
         $template->param( error => 1 );
     }
     $template->param( email_add => $email_add );