mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged DEV/GAV/AWE2 branch to HEAD and fixes for several integration issues.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18473 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -520,12 +520,29 @@ public class Search extends BaseScopableProcessorExtension
|
|||||||
{
|
{
|
||||||
if (page.get("maxItems") != null)
|
if (page.get("maxItems") != null)
|
||||||
{
|
{
|
||||||
maxResults = ((Number)page.get("maxItems")).intValue();
|
Object maxItems = page.get("maxItems");
|
||||||
|
if (maxItems instanceof Number)
|
||||||
|
{
|
||||||
|
maxResults = ((Number)maxItems).intValue();
|
||||||
|
}
|
||||||
|
else if (maxItems instanceof String)
|
||||||
|
{
|
||||||
|
// try and convert to int (which it what it should be!)
|
||||||
|
maxResults = Integer.parseInt((String)maxItems);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (page.get("skipCount") != null)
|
if (page.get("skipCount") != null)
|
||||||
|
{
|
||||||
|
Object skipCount = page.get("skipCount");
|
||||||
|
if (skipCount instanceof Number)
|
||||||
{
|
{
|
||||||
skipResults = ((Number)page.get("skipCount")).intValue();
|
skipResults = ((Number)page.get("skipCount")).intValue();
|
||||||
}
|
}
|
||||||
|
else if (skipCount instanceof String)
|
||||||
|
{
|
||||||
|
skipResults = Integer.parseInt((String)skipCount);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// query templates
|
// query templates
|
||||||
|
Reference in New Issue
Block a user