From 2ed808366a60d83e2fe786c4df9bf42c326d813e Mon Sep 17 00:00:00 2001 From: orbiter Date: Mon, 25 Jun 2007 14:41:54 +0000 Subject: [PATCH] fix for wrong deletion in profile editor git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3921 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/CrawlProfileEditor_p.html | 8 ++++---- htroot/CrawlProfileEditor_p.java | 12 ++++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/htroot/CrawlProfileEditor_p.html b/htroot/CrawlProfileEditor_p.html index ac4559232..1eb02bc80 100644 --- a/htroot/CrawlProfileEditor_p.html +++ b/htroot/CrawlProfileEditor_p.html @@ -16,7 +16,6 @@ -
Crawl Profile List @@ -60,16 +59,17 @@ + + #{/crawlProfiles}#
#(indexMedia)#no::yes#(/indexMedia)# #(remoteIndexing)#no::yes#(/remoteIndexing)# #(deleteButton)#:: +
#(/deleteButton)# - -
- +
diff --git a/htroot/CrawlProfileEditor_p.java b/htroot/CrawlProfileEditor_p.java index 41ca20118..a24e8f9e3 100644 --- a/htroot/CrawlProfileEditor_p.java +++ b/htroot/CrawlProfileEditor_p.java @@ -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