From 20d941cdd9ca4e94ba91f2b398a91b5ffddd80da Mon Sep 17 00:00:00 2001 From: dbs Date: Mon, 15 Nov 2010 04:52:59 +0000 Subject: [PATCH] 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/branches/rel_2_0@18730 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm | 3 +++ 1 file changed, 3 insertions(+) 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/] }, -- 2.11.0