use configured search items per page if not specified in post

- remove verify=cacheonly from admin screen search box to use the configured values
  (otherwise definition overwrites configured behavior and is used for following searches what might give unexpected/confusing different results compared to using /yacysearch )
pull/1/head
reger 11 years ago
parent 4709d8417c
commit 9962b9e548

@ -13,8 +13,6 @@
</a>
<form class="navbar-form" method="get" accept-charset="UTF-8" action="/yacysearch.html" style="padding-left:200px;max-width:400px;">
<input name="query" placeholder="Search..." class="form-control" type="text" size="36" maxlength="200" value=""/>
<input type="hidden" name="verify" value="cacheonly" />
<input type="hidden" name="maximumRecords" value="10" />
<input type="hidden" name="resource" value="global" />
<input type="hidden" name="urlmaskfilter" value=".*" />
<input type="hidden" name="prefermaskfilter" value="" />

@ -50,7 +50,7 @@ public class yacyinteractive {
final String query = (post == null) ? "" : post.get("query", "");
final String startRecord = (post == null) ? "0" : post.get("startRecord", "");
final String maximumRecords = (post == null) ? "10" : post.get("maximumRecords", "");
final String maximumRecords = (post == null) ? sb.getConfig(SwitchboardConstants.SEARCH_ITEMS, "10") : post.get("maximumRecords", "");
final boolean focus = (post == null) ? true : post.get("focus", "1").equals("1");
prop.putHTML("query", query);
prop.put("startRecord", startRecord);

@ -224,7 +224,7 @@ public class yacysearch {
? 100
: 5000) : (snippetFetchStrategy != null
&& snippetFetchStrategy.isAllowedToFetchOnline() ? 20 : 1000),
post.getInt("maximumRecords", post.getInt("count", post.getInt("rows", 10)))); // SRU syntax with old property as alternative
post.getInt("maximumRecords", post.getInt("count", post.getInt("rows", sb.getConfigInt(SwitchboardConstants.SEARCH_ITEMS, 10))))); // SRU syntax with old property as alternative
int startRecord = post.getInt("startRecord", post.getInt("offset", post.getInt("start", 0)));
final boolean indexof = (post != null && post.get("indexof", "").equals("on"));

Loading…
Cancel
Save