#!/usr/bin/perl
-# $Id$
# Copyright 2000-2002 Katipo Communications
#
if ($query) {
# find results
- my ( $error, $marcresults ) = SimpleSearch($query);
+ my ( $error, $marcresults, $total_hits ) = SimpleSearch($query);
if ( defined $error ) {
$template->param( error => $error );
exit;
}
- if(not defined $marcresults){
- $template->param(query => $query);
- warn "no result found";
- output_html_with_http_headers $input, $cookie, $template->output;
- exit;
- }
-
# format output
my $total = scalar @$marcresults;
- my @newresults = searchResults( $query, $total, $results_per_page, $page, @$marcresults );
-
+ my @newresults = searchResults( $query, $total, $results_per_page, $page-1, @$marcresults );
$template->param(
total => $total,
query => $query,
$template->param(
frameworkcodeloop => \@frameworkcodeloop,
+ breeding_count => $countbr,
breeding_loop => \@breeding_loop,
);