mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Partial fix for MOB-1609: Incorrect number of results returned from audit log - size parameter is not correctly processed
- This will pull back the correct number if you request less than the total number of audit entries - TODO: You can still get N-1 entries if you request more than the total number of entries - TODO: Reverse order of limited queries (last N) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16518 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -258,7 +258,7 @@ public class AuditDAOImpl extends AbstractAuditDAOImpl
|
|||||||
if (maxResults > 0)
|
if (maxResults > 0)
|
||||||
{
|
{
|
||||||
// Calculate the maximum results required
|
// Calculate the maximum results required
|
||||||
int sqlMaxResults = (maxResults > 0 ? ((maxResults+1) * 20) : Integer.MAX_VALUE);
|
int sqlMaxResults = (maxResults > 0 ? ((maxResults+1) * 100) : Integer.MAX_VALUE);
|
||||||
|
|
||||||
List<AuditQueryResult> rows = template.queryForList(SELECT_ENTRIES_WITH_VALUES, params, 0, sqlMaxResults);
|
List<AuditQueryResult> rows = template.queryForList(SELECT_ENTRIES_WITH_VALUES, params, 0, sqlMaxResults);
|
||||||
for (AuditQueryResult row : rows)
|
for (AuditQueryResult row : rows)
|
||||||
|
Reference in New Issue
Block a user