fix for bug 1604: when doing a 'scan', "count" isn't displayed
authorJoshua Ferraro <jmf@liblime.com>
Tue, 18 Dec 2007 02:25:02 +0000 (20:25 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 18 Dec 2007 04:28:59 +0000 (22:28 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Search.pm
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl

index 9c7e7a1..a108525 100644 (file)
@@ -429,8 +429,8 @@ sub getRecords {
                         my $tmprecord = MARC::Record->new();
                         $tmprecord->encoding('UTF-8');
                         my $tmptitle;
-
-                       # srote the minimal record in author/title (depending on MARC flavour)
+                                               my $tmpauthor;
+                       # the minimal record in author/title (depending on MARC flavour)
                         if ( C4::Context->preference("marcflavour") eq
                             "UNIMARC" )
                         {
@@ -441,15 +441,12 @@ sub getRecords {
                             );
                         }
                         else {
-                            $tmptitle = MARC::Field->new(
-                                '245', ' ', ' ',
-                                a => $term,
-                                b => $occ
-                            );
+                            $tmptitle = MARC::Field->new('245', ' ', ' ',a => $term,);
+                                                       $tmpauthor = MARC::Field->new('100', ' ', ' ',a => $occ,);
                         }
                         $tmprecord->append_fields($tmptitle);
-                        $results_hash->{'RECORDS'}[$j] =
-                          $tmprecord->as_usmarc();
+                                               $tmprecord->append_fields($tmpauthor);
+                        $results_hash->{'RECORDS'}[$j] = $tmprecord->as_usmarc();
                     }
                     else {
                         $record = $results[ $i - 1 ]->record($j)->raw();
index 8cd9ba8..85b01c5 100644 (file)
@@ -149,7 +149,7 @@ $(window).load(function() {
                             <a href="/cgi-bin/koha/catalogue/search.pl?q=<!-- TMPL_VAR NAME="scan_use" escape="url" -->&quot;<!-- TMPL_VAR NAME="title" -->&quot;"><!-- TMPL_VAR NAME="title" --></a>
                         </td>
                         <td>
-                            <!-- TMPL_VAR NAME="subtitle" -->
+                            <!-- TMPL_VAR NAME="author" -->
                         </td>
                     </tr>
                 <!-- /TMPL_LOOP -->