summaryrefslogtreecommitdiffstats
path: root/pki/base/common
diff options
context:
space:
mode:
authorawnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2009-05-31 02:22:38 +0000
committerawnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2009-05-31 02:22:38 +0000
commit87542357375c422c7e49d7b4ca3d9a9b0b2085a3 (patch)
tree88c90ba7c59b1c5e173625f4d08be8356e7d7e0e /pki/base/common
parent7033eb5123fa95804edad9f4d2136597fe959e5d (diff)
downloadpki-87542357375c422c7e49d7b4ca3d9a9b0b2085a3.tar.gz
pki-87542357375c422c7e49d7b4ca3d9a9b0b2085a3.tar.xz
pki-87542357375c422c7e49d7b4ca3d9a9b0b2085a3.zip
Fixed bugzilla bug #482935.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@528 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/common')
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java b/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java
index 5b4a3b059..98f624160 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java
@@ -92,6 +92,7 @@ public class QueryReq extends CMSServlet {
private IReqParser mParser = null;
private IRequestQueue mQueue = null;
private String mFormPath = null;
+ private int mMaxReturns = 2000;
public CMSRequest newCMSRequest() {
return new CMSRequest();
@@ -115,6 +116,12 @@ public class QueryReq extends CMSServlet {
mQueue = mAuthority.getRequestQueue();
mFormPath = "/" + mAuthority.getId() + "/" + TPL_FILE;
+ try {
+ mMaxReturns = Integer.parseInt(sc.getInitParameter("maxResults"));
+ } catch (Exception e) {
+ /* do nothing, just use the default if integer parsing failed */
+ }
+
String tmp = sc.getInitParameter(PROP_PARSER);
if (tmp != null) {
@@ -302,6 +309,10 @@ public class QueryReq extends CMSServlet {
maxCount = Integer.parseInt(req.getParameter(IN_MAXCOUNT));
} catch (Exception e) {
}
+ if (maxCount > mMaxReturns) {
+ CMS.debug("Resetting page size from " + maxCount + " to " + mMaxReturns);
+ maxCount = mMaxReturns;
+ }
HttpServletResponse resp = cmsReq.getHttpResp();
CMSTemplateParams argset = doSearch(locale[0],filter, maxCount, direction, top, bottom );