Skip to content

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

*) Value entered in searchfield will not get lost anymore when link "more options..." is clicked. If Javascript is disabled or function does not work for any other reason, there should be no change to current behaviour.

low012479861a3cf82
diff --git a/htroot/index.html b/htroot/index.html
index bf2ee65d9..fa366b331 100644
--- a/htroot/index.html
+++ b/htroot/index.html
@@ -15,10 +15,9 @@
<center><img src="/env/grafics/kaskelix.png" align="middle" alt="Kaskelix - the YaCy logo"></center><br>
<center>#[promoteSearchPageGreeting]#</center><br>
- <form action="yacysearch.html" method="get">
+ <form action="yacysearch.html" method="get" name="searchform">
<input type="hidden" name="display" value="#[display]#">
<center>
-
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan=2>
@@ -38,7 +37,7 @@
<input type="hidden" name="prefermaskfilter" value="">
<tr align="left">
<td></td>
- <td><a href="/index.html?searchoptions=1&display=#[display]#">more options...</a></td>
+ <td><a href="/index.html?searchoptions=1&display=#[display]#" onClick="this.href='/index.html?searchoptions=1&display=#[display]#&handover='+document.searchform.search.value">more options...</a></td>
</tr>
::
<tr align="left">
diff --git a/htroot/index.java b/htroot/index.java
index cce17671a..704bad584 100644
--- a/htroot/index.java
+++ b/htroot/index.java
@@ -70,6 +70,7 @@ public class index {
int searchoptions = (post == null) ? 0 : post.getInt("searchoptions", 0);
final boolean indexDistributeGranted = sb.getConfig("allowDistributeIndex", "true").equals("true");
final boolean indexReceiveGranted = sb.getConfig("allowReceiveIndex", "true").equals("true");
+ final String handover = (post == null) ? "" : post.get("handover", "");
if (!indexDistributeGranted || !indexReceiveGranted) { global = false; }
final String referer = (String) header.get("Referer");
@@ -96,7 +97,7 @@ public class index {
String promoteSearchPageGreeting = env.getConfig("promoteSearchPageGreeting", "");
if (promoteSearchPageGreeting.length() == 0) promoteSearchPageGreeting = "P2P WEB SEARCH";
prop.put("promoteSearchPageGreeting", promoteSearchPageGreeting);
- prop.put("former", "");
+ prop.put("former", handover);
prop.put("num-results", 0);
prop.put("excluded", 0);
prop.put("combine", 0);