From 2482b27d61789c3648baf4b99031f6b05eb60eea Mon Sep 17 00:00:00 2001 From: Garry Collum Date: Tue, 16 Jun 2009 20:37:51 -0400 Subject: [PATCH] Bug 3317: Author displaying inconsistently or not at all. Revision to previous patch. Revision to previous patch for bug 3317. Removes the EXPR command from opac-basket.tmpl, which was polluting the apache logs. NTS: Don't use EXPR. Signed-off-by: Galen Charlton --- koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl | 1 - opac/opac-basket.pl | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl index 100bf831c0..8427d450ba 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl @@ -80,7 +80,6 @@ - Authors diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl index b36e8c1caf..a50bdd5796 100755 --- a/opac/opac-basket.pl +++ b/opac/opac-basket.pl @@ -62,6 +62,11 @@ 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'} ); @@ -90,6 +95,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"; -- 2.39.5