bug 4801: fix paging in display of staged bibs and import batches

Fixed glitch where the first page of bibs in a batch (or the first
page of import batches) was displaying the entire list instead
of the correct number of records per page.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
Galen Charlton 2010-05-21 09:34:42 -04:00 committed by Chris Cormack
parent 1200455a60
commit 8a25e80f99

View file

@ -775,11 +775,11 @@ sub GetImportBatchRangeDesc {
WHERE batch_type = 'batch'
ORDER BY import_batch_id DESC";
my @params;
if ($results_per_group){
$query .= " LIMIT ?";
push(@params, $results_per_group);
}
if ($offset){
if ($results_per_group){
$query .= " LIMIT ?";
push(@params, $results_per_group);
}
$query .= " OFFSET ?";
push(@params, $offset);
}
@ -856,11 +856,11 @@ sub GetImportBibliosRange {
}
$query.=" ORDER BY import_record_id";
if($results_per_group){
$query .= " LIMIT ?";
push(@params, $results_per_group);
}
if($offset){
if($results_per_group){
$query .= " LIMIT ?";
push(@params, $results_per_group);
}
$query .= " OFFSET ?";
push(@params, $offset);
}