Second CAS version : CAS and non-CAS login can coexist
[koha_fer] / opac / opac-basket.pl
index 8edaf8a..c044fee 100755 (executable)
@@ -68,9 +68,14 @@ foreach my $biblionumber ( @bibs ) {
     my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
     my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
     my @items            = &GetItemsInfo( $biblionumber, 'opac' );
+
+    my $hasauthors = 0;
+    if($dat->{'author'} || @$marcauthorsarray) {
+      $hasauthors = 1;
+    }
        
-    my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'});
-    my $collections =  GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'} );
+    my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'}, 'opac');
+    my $collections =  GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'}, 'opac');
 
        for my $itm (@items) {
            if ($itm->{'location'}){
@@ -96,6 +101,7 @@ foreach my $biblionumber ( @bibs ) {
     $dat->{MARCAUTHORS}    = $marcauthorsarray;
     $dat->{MARCSERIES}  = $marcseriesarray;
     $dat->{MARCURLS}    = $marcurlsarray;
+    $dat->{HASAUTHORS}  = $hasauthors;
 
     if ( C4::Context->preference("BiblioDefaultView") eq "normal" ) {
         $dat->{dest} = "opac-detail.pl";