Skip to content
Snippets Groups Projects
Commit 9242f08d authored by Demian Katz's avatar Demian Katz Committed by Robert Lange
Browse files

Fix bug: resumption tokens missing when paginating deleted records.

- Resolves VUFIND-1429.
parent d405e964
Branches
Tags
No related merge requests found
...@@ -812,7 +812,12 @@ class Server ...@@ -812,7 +812,12 @@ class Server
$this->attachNonDeleted($xml, $doc, $format, $headersOnly, $set); $this->attachNonDeleted($xml, $doc, $format, $headersOnly, $set);
$currentCursor++; $currentCursor++;
} }
$nextCursorMark = $result->getCursorMark(); // We only need a cursor mark if we fetched results from Solr; if our
// $recordLimit is 0, it means that we're still in the process of
// retrieving deleted records, and we're only hitting Solr to obtain a
// total record count. Therefore, we don't want to change the cursor
// mark yet, or it will break pagination of deleted records.
$nextCursorMark = $recordLimit > 0 ? $result->getCursorMark() : '';
// If our cursor didn't reach the last record, we need a resumption token! // If our cursor didn't reach the last record, we need a resumption token!
$listSize = $deletedCount + $nonDeletedCount; $listSize = $deletedCount + $nonDeletedCount;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment