Bug 3317: Author displaying inconsistently or not at all. Revision to previous patch.
authorGarry Collum <gcollum@gmail.com>
Wed, 17 Jun 2009 00:37:51 +0000 (20:37 -0400)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 16 Sep 2009 21:19:39 +0000 (23:19 +0200)
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 <galen.charlton@liblime.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
opac/opac-basket.pl

index 100bf83..8427d45 100644 (file)
@@ -80,7 +80,6 @@
             <td><!-- TMPL_VAR NAME="isbn" --></td>
         </tr>
         <!-- /TMPL_IF -->
-        
         <!-- TMPL_IF name="MARCAUTHORS" -->
         <tr>
             <th scope="row">Authors</th>
index b36e8c1..a50bdd5 100755 (executable)
@@ -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";