set default number of search results in ConfigPortal.html

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@8008 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 13 years ago
parent 279482a76d
commit ba41a869a7

@ -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>

@ -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);

Loading…
Cancel
Save