[open-ils-commits] r18728 - trunk/Open-ILS/src/perlmods/OpenILS/Application (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Sun Nov 14 23:50:25 EST 2010


Author: dbs
Date: 2010-11-14 23:50:22 -0500 (Sun, 14 Nov 2010)
New Revision: 18728

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
Log:
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


Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm	2010-11-15 01:45:11 UTC (rev 18727)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm	2010-11-15 04:50:22 UTC (rev 18728)
@@ -1365,6 +1365,9 @@
 	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/] },



More information about the open-ils-commits mailing list