From 350e1c919e042f1874898076006baf9d055a0fc5 Mon Sep 17 00:00:00 2001 From: dbs Date: Mon, 15 Nov 2010 04:50:22 +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/trunk@18728 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