From: miker Date: Mon, 19 Jul 2010 19:03:20 +0000 (+0000) Subject: use abs() to get page number in either direction X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=81a8a48617c80d5c8163a162f38dba15a3dbd216;p=evergreen%2Fpines.git 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 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm index e37968aa25..d80ddc4898 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 = ();