Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

set default number of search results in ConfigPortal.html

orbiterba41a869a7a2
diff --git a/htroot/ConfigPortal.html b/htroot/ConfigPortal.html
index 3d728faca..8410d8d81 100644
--- a/htroot/ConfigPortal.html
+++ b/htroot/ConfigPortal.html
@@ -83,6 +83,9 @@
<input type="radio" name="popup" value="interactive" #(popupInteractive)#::checked="checked"#(/popupInteractive)# />Interactive Search Page&nbsp;
</dd>
+ <dt>Default maximum number of results per page</dt>
+ <dd><input type="text" name="maximumRecords" value="#[maximumRecords]#" size="3" /></dd>
+
<dt>Default index.html Page (by forwarder)</dt>
<dd><input type="text" name="indexForward" value="#[indexForward]#" size="60" /></dd>
diff --git a/htroot/ConfigPortal.java b/htroot/ConfigPortal.java
index 58688b35e..2c3bffdb9 100644
--- a/htroot/ConfigPortal.java
+++ b/htroot/ConfigPortal.java
@@ -68,6 +68,7 @@ public class ConfigPortal {
sb.setConfig(SwitchboardConstants.GREETING_LARGE_IMAGE, post.get(SwitchboardConstants.GREETING_LARGE_IMAGE, ""));
sb.setConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, post.get(SwitchboardConstants.GREETING_SMALL_IMAGE, ""));
sb.setConfig(SwitchboardConstants.SEARCH_TARGET, post.get("target", "_self"));
+ sb.setConfig(SwitchboardConstants.SEARCH_ITEMS, post.getInt("maximumRecords", 10));
sb.setConfig(SwitchboardConstants.INDEX_FORWARD, post.get(SwitchboardConstants.INDEX_FORWARD, ""));
HTTPDFileHandler.indexForward = post.get(SwitchboardConstants.INDEX_FORWARD, "");
sb.setConfig("publicTopmenu", post.getBoolean("publicTopmenu", true));
@@ -153,6 +154,8 @@ public class ConfigPortal {
} else {
prop.put("popupStatus", 1);
}
+
+ prop.put("maximumRecords", sb.getConfigInt(SwitchboardConstants.SEARCH_ITEMS, 10));
final String target = sb.getConfig(SwitchboardConstants.SEARCH_TARGET, "_self");
prop.put("selected_blank", "_blank".equals(target) ? 1 : 0);