From 937dd956d32d4d3ac4dda36767f83912d735ef75 Mon Sep 17 00:00:00 2001 From: lotus Date: Tue, 21 Sep 2010 19:45:49 +0000 Subject: [PATCH] save default number of search items via web interface git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7179 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/yacysearch.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index 1946bc66f..d9ae825ed 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -168,6 +168,9 @@ public class yacysearch { int itemsPerPage = Math.min((authenticated) ? (snippetFetchStrategy.isAllowedToFetchOnline() ? 100 : 1000) : (snippetFetchStrategy.isAllowedToFetchOnline() ? 10 : 100), post.getInt("maximumRecords", post.getInt("count", 10))); // SRU syntax with old property as alternative int offset = (newsearch) ? 0 : post.getInt("startRecord", post.getInt("offset", 0)); + int newcount; + if ( authenticated && (newcount = post.getInt("count", 0)) > 0 ) sb.setConfig(SwitchboardConstants.DEFAULT_SEARCHITEMS, newcount); // set new default maximumRecords if search with "more options" + boolean global = post.get("resource", "local").equals("global") && sb.peers.sizeConnected() > 0; final boolean indexof = (post != null && post.get("indexof","").equals("on"));