From: dbs Date: Mon, 15 Nov 2010 04:50:22 +0000 (+0000) Subject: Fix negative paging issue in open-ils.supercat.authority.author.startwith X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=350e1c919e042f1874898076006baf9d055a0fc5;p=contrib%2FConifer.git Fix negative paging issue in open-ils.supercat.authority.author.startwith When paging backwards through authority lists, we were skipping the first page of results. By reducing the offset by the value of one page, we restore the expected order. The same problem might affect other paging interfaces: to be determined. Closes Launchpad bug 669247 git-svn-id: svn://svn.open-ils.org/ILS/trunk@18728 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 8806980c73..3b7eba8191 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm @@ -1365,6 +1365,9 @@ sub authority_tag_sf_startwith { my @list = (); if ($page < 0) { + # Don't skip the first actual page of results in descending order + $offset = $offset - $limit; + my $before = $_storage->request( "open-ils.cstore.json_query.atomic", { select => { afr => [qw/record value/] },