From 81a8a48617c80d5c8163a162f38dba15a3dbd216 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 19 Jul 2010 19:03:20 +0000 Subject: [PATCH] use abs() to get page number in either direction git-svn-id: svn://svn.open-ils.org/ILS/trunk@16980 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm index e37968aa2..d80ddc489 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm @@ -381,7 +381,7 @@ sub cn_startwith { my $copy_locations = shift || []; - my $offset = $page * $limit; + my $offset = abs($page) * $limit; my $_storage = OpenSRF::AppSession->create( 'open-ils.cstore' ); my $o_search = { shortname => $ou }; @@ -1120,7 +1120,7 @@ sub tag_sf_startwith { my $statuses = shift || []; my $copy_locations = shift || []; - my $offset = $limit * $page; + my $offset = $limit * abs($page); my $_storage = OpenSRF::AppSession->create( 'open-ils.cstore' ); my @ou_ids; @@ -1353,7 +1353,7 @@ sub authority_tag_sf_startwith { my $limit = shift || 10; my $page = shift || 0; - my $offset = $limit * $page; + my $offset = $limit * abs($page); my $_storage = OpenSRF::AppSession->create( 'open-ils.cstore' ); my @list = (); -- 2.11.0