# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
=head1 NAME
=cut
use strict;
+#use warnings; FIXME - Bug 2505
use C4::Search;
use CGI;
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'},
resultsloop => \@results,
total => $total_hits,
query => $query,
- pagination_bar => pagination_bar( "$ENV{'SCRIPT_NAME'}?q=$query&booksellerid=$booksellerid&", getnbpages( $total_hits, $results_per_page ), $page, 'page' ),
+ pagination_bar => pagination_bar( "$ENV{'SCRIPT_NAME'}?q=$query&booksellerid=$booksellerid&basketno=$basketno&", getnbpages( $total_hits, $results_per_page ), $page, 'page' ),
);
# BUILD THE TEMPLATE