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.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7194 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
orbiter 2010-09-26 21:11:08 +00:00
parent afa708d552
commit d5dc88a351
2 changed files with 4 additions and 0 deletions

View File

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

View File

@ -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()) {