From 042f1710223e714320374e4aeffcd79ad55c890d Mon Sep 17 00:00:00 2001 From: theli Date: Wed, 18 May 2005 07:46:34 +0000 Subject: [PATCH] *) Correcting problems with old seed configuration git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@133 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/Settings_p.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/htroot/Settings_p.java b/htroot/Settings_p.java index adb43ea85..b52db1756 100644 --- a/htroot/Settings_p.java +++ b/htroot/Settings_p.java @@ -135,10 +135,20 @@ public final class Settings_p { */ // available methods String enabledUploader = env.getConfig("seedUploadMethod", "none"); + + // for backward compatiblity .... + if ((enabledUploader.equalsIgnoreCase("Ftp")) || + ((enabledUploader.equals("")) && + (env.getConfig("seedFTPPassword","").length() > 0) && + (env.getConfig("seedFilePath", "").length() > 0))) { + enabledUploader = "Ftp"; + env.setConfig("seedUploadMethod",enabledUploader); + } + Hashtable uploaders = yacyCore.getSeedUploadMethods(); prop.put("seedUploadMethods", uploaders.size() + 1); prop.put("seedUploadMethods_0_name", "none"); - prop.put("seedUploadMethods_0_selected", 1); + prop.put("seedUploadMethods_0_selected", enabledUploader.equals("none")?1:0); prop.put("seedUploadMethods_0_file", ""); int count = 0;