From 7d3b8b566f9f93975d49162be949f9165f6882be Mon Sep 17 00:00:00 2001 From: hdl Date: Tue, 31 Jan 2006 10:59:41 +0000 Subject: [PATCH] Bug fixing : result page display was not correct. Id onlys incremented one result line and not the whole page --- acqui.simple/isbnsearch.pl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/acqui.simple/isbnsearch.pl b/acqui.simple/isbnsearch.pl index 2d040254da..b5b8c3dbb7 100755 --- a/acqui.simple/isbnsearch.pl +++ b/acqui.simple/isbnsearch.pl @@ -84,6 +84,8 @@ my $dbh = C4::Context->dbh; } } findseealso($dbh,\@tags); + my $from = $startfrom*$resultsperpage+1; + my ($results,$total) = catalogsearch($dbh, \@tags,\@and_or, \@excluding, \@operator, \@value, $startfrom*$resultsperpage, $resultsperpage,'biblio.title','ASC'); @@ -113,6 +115,14 @@ my $dbh = C4::Context->dbh; if(($total - (($startfrom+1)*($resultsperpage))) > 0 ) { $displaynext = 1; } + my $to; + + if($total < (($startfrom+1)*$resultsperpage)) + { + $to = $total; + } else { + $to = (($startfrom+1)*$resultsperpage); + } my @field_data = (); @@ -138,15 +148,6 @@ my $dbh = C4::Context->dbh; } } } - my $from = $startfrom*$resultsperpage+1; - my $to; - - if($total < (($startfrom+1)*$resultsperpage)) - { - $to = $total; - } else { - $to = (($startfrom+1)*$resultsperpage); - } # fill with books in breeding farm my $toggle=0; -- 2.39.5