diff options
author | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2011-04-16 00:11:01 +0000 |
---|---|---|
committer | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2011-04-16 00:11:01 +0000 |
commit | 4e2ed69f618be5951bc2f1c8097c5beba05337f9 (patch) | |
tree | 027809fa877025a23dd09c10665df3e59a44d3b9 | |
parent | b8c38f2350a944d8891d01cc6131f0488e1c6668 (diff) | |
download | pki-4e2ed69f618be5951bc2f1c8097c5beba05337f9.tar.gz pki-4e2ed69f618be5951bc2f1c8097c5beba05337f9.tar.xz pki-4e2ed69f618be5951bc2f1c8097c5beba05337f9.zip |
Fixed bugzilla bug #694143.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1968 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
-rw-r--r-- | pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java | 14 |
1 files changed, 12 insertions, 2 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 3654b1162..68c4606df 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 @@ -299,8 +299,16 @@ public class QueryReq extends CMSServlet { String bottom_s = req.getParameter(OUT_LAST_ENTRY_ON_PAGE); if (bottom_s == null) bottom_s = "0"; - top = Integer.parseInt(top_s); - bottom = Integer.parseInt(bottom_s); + if (top_s.trim().startsWith("0x")) { + top = Integer.parseInt(top_s.trim().substring(2), 16); + } else { + top = Integer.parseInt(top_s.trim()); + } + if (bottom_s.trim().startsWith("0x")) { + bottom = Integer.parseInt(bottom_s.trim().substring(2), 16); + } else { + bottom = Integer.parseInt(bottom_s.trim()); + } } catch (NumberFormatException e) { @@ -369,6 +377,8 @@ public class QueryReq extends CMSServlet { ctp = doSearch(l,filter, count, bottom+1); } else if (direction.equals("begin")) { ctp = doSearch(l,filter, count, 0); + } else if (direction.equals("first")) { + ctp = doSearch(l,filter, count, bottom); } else { // if 'direction is 'end', default here ctp = doSearch(l,filter, -count, -1); } |