fix for wrong deletion in profile editor

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3921 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent 5009695537
commit 2ed808366a

@ -16,7 +16,6 @@
<!-- crawl profile list -->
<form action="CrawlProfileEditor_p.html" method="get" enctype="multipart/form-data">
<fieldset><legend>Crawl Profile List</legend>
<table border="0" cellpadding="2" cellspacing="1">
<colgroup>
@ -60,16 +59,17 @@
<td>#(indexMedia)#no::yes#(/indexMedia)#</td>
<td>#(remoteIndexing)#no::yes#(/remoteIndexing)#</td>
<td>#(deleteButton)#::
<form action="CrawlProfileEditor_p.html" method="get" enctype="multipart/form-data">
<pre><input type="hidden" name="handle" value="#[handle]#" /></pre>
<pre><input type="submit" name="deleteprofile" value="Delete" /></pre>
#(/deleteButton)#
</td>
</form>
</td>
</tr>
#{/crawlProfiles}#
</table>
</fieldset>
</form>
<!-- crawl profile editor -->
<form action="CrawlProfileEditor_p.html" method="post" enctype="multipart/form-data">

@ -102,14 +102,10 @@ public class CrawlProfileEditor_p {
final plasmaSwitchboard sb = (plasmaSwitchboard)env;
// read post for handle
String handle = "";
if (post != null) {
handle = post.get("handle", "");
if (post.containsKey("deleteprofile")) {
// deletion of a crawl
if (handle != null) sb.profiles.removeEntry(handle);
}
String handle = (post == null) ? "" : post.get("handle", "");
if ((post != null) && (post.containsKey("deleteprofile"))) {
// deletion of a crawl
sb.profiles.removeEntry(handle);
}
// generate handle list

Loading…
Cancel
Save