Bug 3808 Display correct number of records in neworderbiblio screen
authorColin Campbell <colin.campbell@ptfs-europe.com>
Wed, 3 Feb 2010 19:34:58 +0000 (19:34 +0000)
committerGalen Charlton <gmcharlt@gmail.com>
Wed, 3 Feb 2010 20:09:31 +0000 (15:09 -0500)
New version of patch to apply against 3.2alpha
Also remove related FIXME message that was displaying to the user

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
acqui/neworderbiblio.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tmpl

index 471af4a..1bb8c67 100755 (executable)
@@ -107,19 +107,15 @@ if (defined $error) {
 my @results;
 
 if ($marcresults) {
-    foreach my $i ( 0 .. scalar @$marcresults ) {
-        my %resultsloop;
-        my $marcrecord = MARC::File::USMARC::decode( $marcresults->[$i] );
+    foreach my $result ( @{$marcresults} ) {
+        my $marcrecord = MARC::File::USMARC::decode( $result );
         my $biblio = TransformMarcToKoha( C4::Context->dbh, $marcrecord, '' );
 
-        #build the hash for the template.
-        %resultsloop = %$biblio;
-        $resultsloop{highlight} = ( $i % 2 ) ? (1) : (0);
-        $resultsloop{booksellerid} = $booksellerid;
-        push @results, \%resultsloop;
+        $biblio->{booksellerid} = $booksellerid;
+        push @results, $biblio;
+
     }
 }
-
 $template->param(
     basketno             => $basketno,
     booksellerid     => $bookseller->{'id'},
index 6fa0229..e8ef0eb 100644 (file)
@@ -19,7 +19,7 @@
 
 
 <!-- TMPL_IF NAME="total" -->
-<b><!-- TMPL_VAR NAME="total" -->results found,  FIXME:: pagenum count is wrong!!!  </b> 
+<b><!-- TMPL_VAR NAME="total" -->results found </b> 
 <!-- TMPL_VAR name='pagination_bar'-->
 <!-- TMPL_ELSE -->
 <h3> No results found</h3>