[Koha-patches] [PATCH] Bug 3317: Author displaying inconsistently or not at all. Revision to previous patch.
Garry Collum
gcollum at gmail.com
Wed Jun 17 02:37:51 CEST 2009
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.
---
.../opac-tmpl/prog/en/modules/opac-basket.tmpl | 4 ++--
opac/opac-basket.pl | 6 ++++++
2 files changed, 8 insertions(+), 2 deletions(-)
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 84cfea1..3e537d0 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
@@ -168,8 +168,8 @@ function tagAdded() {
<td><!-- TMPL_VAR NAME="isbn" --></td>
</tr>
<!-- /TMPL_IF -->
-
- <!-- TMPL_IF EXPR="MARCAUTHORS || author" -->
+
+ <!-- TMPL_IF "HASAUTHORS" -->
<tr>
<th scope="row">Author(s)</th>
<td>
diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl
index 8edaf8a..a4383ab 100755
--- a/opac/opac-basket.pl
+++ b/opac/opac-basket.pl
@@ -68,6 +68,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'} );
@@ -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";
--
1.5.6.5
More information about the Koha-patches
mailing list