[sword-svn] r401 - trunk/webapp
scribe at crosswire.org
scribe at crosswire.org
Wed Oct 10 05:16:59 MST 2012
Author: scribe
Date: 2012-10-10 05:16:58 -0700 (Wed, 10 Oct 2012)
New Revision: 401
Modified:
trunk/webapp/wordsearchresults.jsp
Log:
fixed bug to remember search options on paging
Modified: trunk/webapp/wordsearchresults.jsp
===================================================================
--- trunk/webapp/wordsearchresults.jsp 2012-08-31 21:11:22 UTC (rev 400)
+++ trunk/webapp/wordsearchresults.jsp 2012-10-10 12:16:58 UTC (rev 401)
@@ -28,13 +28,17 @@
}
String activeSearchTerm = (String) session.getAttribute("ActiveSearchTerm");
- String range = "";
String tmp = request.getParameter("range");
if (tmp != null) {
- range = tmp;
+ tmp = new String(tmp.getBytes("iso8859-1"), "UTF-8");
+ session.setAttribute("ActiveRange", tmp);
}
+ String range = (String) session.getAttribute("ActiveRange");
+ if (range == null) {
+ range = "";
+ }
- SearchType stype = (activeModule.hasSearchFramework()) ? SearchType.LUCENE : SearchType.MULTIWORD;
+ SearchType stype = null;
tmp = request.getParameter("stype");
if (tmp != null) {
if (tmp.equalsIgnoreCase("P")) {
@@ -43,13 +47,25 @@
if (tmp.equalsIgnoreCase("R")) {
stype = SearchType.REGEX;
}
+ session.setAttribute("ActiveSearchType", stype);
}
- int soptions = 0; // default to NOT ignore case
+ stype = (SearchType) session.getAttribute("ActiveSearchType");
+ if (stype == null) {
+ stype = (activeModule.hasSearchFramework()) ? SearchType.LUCENE : SearchType.MULTIWORD;
+ }
+
+ int soptions = 0;
tmp = request.getParameter("icase");
if ((tmp != null) && (tmp.equals("1"))) {
soptions = 2;
+ session.setAttribute("ActiveSearchOptions", soptions);
}
+ Integer itmp = (Integer) session.getAttribute("ActiveSearchOptions");
+ if (itmp == null) {
+ itmp = 0; // default to NOT ignore case
+ }
+ soptions = itmp;
%>
<tiles:insert beanName="basic" flush="true" >
<tiles:put name="title" type="string">
More information about the sword-cvs
mailing list