mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-9153 Share sometimes asks for a topic listing with a zero page size, avoid giving this to the CQ engine and instead immediately return an empty result set
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30035 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,6 +30,7 @@ import org.alfresco.model.ForumModel;
|
||||
import org.alfresco.query.CannedQueryFactory;
|
||||
import org.alfresco.query.CannedQueryResults;
|
||||
import org.alfresco.query.CannedQuerySortDetails;
|
||||
import org.alfresco.query.EmptyCannedQueryResults;
|
||||
import org.alfresco.query.EmptyPagingResults;
|
||||
import org.alfresco.query.PagingRequest;
|
||||
import org.alfresco.query.PagingResults;
|
||||
@@ -889,6 +890,13 @@ public class DiscussionServiceImpl implements DiscussionService
|
||||
QName nodeType, String creatorUsername, Date from, Date to,
|
||||
boolean oldestFirst, PagingRequest paging)
|
||||
{
|
||||
// The Canned Query system doesn't allow for zero sized pages
|
||||
// If they asked for that (bits of share sometimes do), bail out now
|
||||
if(paging != null && paging.getMaxItems() == 0)
|
||||
{
|
||||
return new EmptyCannedQueryResults<NodeBackedEntity>(null);
|
||||
}
|
||||
|
||||
// Grab the factory
|
||||
GetChildrenAuditableCannedQueryFactory getChildrenCannedQueryFactory = (GetChildrenAuditableCannedQueryFactory)cannedQueryRegistry.getNamedObject(CANNED_QUERY_GET_CHILDREN);
|
||||
|
||||
|
Reference in New Issue
Block a user