Skip to content

Commit

Permalink
fix for wrong deletion in profile editor
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3921 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Jun 25, 2007
1 parent 5009695 commit 2ed8083
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
8 changes: 4 additions & 4 deletions htroot/CrawlProfileEditor_p.html
Expand Up @@ -16,7 +16,6 @@ <h2>Crawl Profile Editor</h2>


<!-- 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>
Expand Down Expand Up @@ -60,16 +59,17 @@ <h2>Crawl Profile Editor</h2>
<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">
Expand Down
12 changes: 4 additions & 8 deletions htroot/CrawlProfileEditor_p.java
Expand Up @@ -102,14 +102,10 @@ public static serverObjects respond(httpHeader header, serverObjects post, serve
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
Expand Down

0 comments on commit 2ed8083

Please sign in to comment.