Skip to content

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

shop cleanup button only if servlet was called without post/put arguments. This should avoid confusion after a search for a word where it is possible to delete the word. If a delete button is shown to delete the word, then there should not be a button available to delete the whole index to avoide a wrong usage when a user searches only for a word to delete it.

orbiterd5dc88a35136
diff --git a/htroot/IndexControlRWIs_p.html b/htroot/IndexControlRWIs_p.html
index b1ac84907..353b43166 100644
--- a/htroot/IndexControlRWIs_p.html
+++ b/htroot/IndexControlRWIs_p.html
@@ -34,6 +34,7 @@
</dl>
</fieldset>
+ #(cleanup)#::
</form>
<form action="IndexControlRWIs_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>Cleanup</legend>
@@ -44,6 +45,7 @@
</dl>
</fieldset>
</form>
+ #(/cleanup)#
#(searchresult)#::
<p>No entry for word '#[word]#'</p>::
diff --git a/htroot/IndexControlRWIs_p.java b/htroot/IndexControlRWIs_p.java
index 36c31f1f9..90d454b1b 100644
--- a/htroot/IndexControlRWIs_p.java
+++ b/htroot/IndexControlRWIs_p.java
@@ -79,6 +79,8 @@ public class IndexControlRWIs_p {
prop.putHTML("keystring", "");
prop.put("keyhash", "");
prop.put("result", "");
+ prop.put("cleanup", post == null ? 1 : 0);
+
String segmentName = sb.getConfig(SwitchboardConstants.SEGMENT_PUBLIC, "default");
int i = 0;
for (String s: sb.indexSegments.segmentNames()) {