From 1b37b12998c4c07290436c6b4d17381ef594aa27 Mon Sep 17 00:00:00 2001 From: reger Date: Sat, 17 May 2014 21:34:23 +0200 Subject: [PATCH 1/3] fix: CrawlStartExpert.html # From File with missing filename - crawlName must not be empty - crawlingFile must not be empty --- htroot/Crawler_p.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htroot/Crawler_p.java b/htroot/Crawler_p.java index 8188a76a2..bf435f4f0 100644 --- a/htroot/Crawler_p.java +++ b/htroot/Crawler_p.java @@ -413,10 +413,11 @@ public class Crawler_p { prop.putHTML("info_error", e.getMessage()); } - boolean hasCrawlstartDataOK = true; - // check crawlurl was given in sitecrawl - if ("url".equals(crawlingMode) && rootURLs.size() == 0) hasCrawlstartDataOK = false; - + boolean hasCrawlstartDataOK = !crawlName.isEmpty(); + if (hasCrawlstartDataOK) { + // check crawlurl was given in sitecrawl + if ("url".equals(crawlingMode) && rootURLs.size() == 0) hasCrawlstartDataOK = false; + } // prepare a new crawling profile final CrawlProfile profile; byte[] handle; @@ -522,7 +523,7 @@ public class Crawler_p { ConcurrentLog.logException(e); } } else if ("file".equals(crawlingMode)) { - if (post.containsKey("crawlingFile")) { + if (post.containsKey("crawlingFile") && crawlingFile != null) { final String crawlingFileContent = post.get("crawlingFile$file", ""); try { // check if the crawl filter works correctly From 89e2c5e884deae4f6d59c4e301e223b577303861 Mon Sep 17 00:00:00 2001 From: reger Date: Sat, 17 May 2014 22:56:15 +0200 Subject: [PATCH 2/3] fix: allow enable of CrawlStartExpert.html #file --- htroot/CrawlStartExpert.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htroot/CrawlStartExpert.html b/htroot/CrawlStartExpert.html index ec4a692a0..d44bffe1a 100644 --- a/htroot/CrawlStartExpert.html +++ b/htroot/CrawlStartExpert.html @@ -133,9 +133,9 @@ }); }; - /** Check DOM & properties if element is checkeds. */ + /** Check DOM & properties if element is checked. */ $.fn.isChecked = function() { - return $(this).attr("checked") || $(this).prop("checked"); + return $(this).prop("checked"); }; /** Set checked state for checkoxes/radio buttons. */ From e31493e139b1772c2d60bea08370eba3b877e88c Mon Sep 17 00:00:00 2001 From: reger Date: Sat, 17 May 2014 23:36:59 +0200 Subject: [PATCH 3/3] "Use remote proxy for yacy" has no function, remove option and related config item see/fix bug http://mantis.tokeek.de/view.php?id=23 http://mantis.tokeek.de/view.php?id=189 --- defaults/yacy.init | 1 - htroot/SettingsAck_p.java | 2 -- htroot/Settings_Proxy.inc | 8 -------- htroot/Settings_p.java | 1 - htroot/Status.java | 1 - source/net/yacy/cora/protocol/http/ProxySettings.java | 8 ++------ source/net/yacy/search/Switchboard.java | 1 - 7 files changed, 2 insertions(+), 20 deletions(-) diff --git a/defaults/yacy.init b/defaults/yacy.init index 02e540d88..ecc898e7a 100644 --- a/defaults/yacy.init +++ b/defaults/yacy.init @@ -335,7 +335,6 @@ plasmaBlueList=yacy.blue # if you want to switch on the proxy use, set remoteProxyUse=true # remoteProxyNoProxy is a no-proxy pattern list for the remote proxy remoteProxyUse=false -remoteProxyUse4Yacy=true remoteProxyUse4SSL=true remoteProxyHost=192.168.2.2 diff --git a/htroot/SettingsAck_p.java b/htroot/SettingsAck_p.java index 7f810c5a2..6219a6e8b 100644 --- a/htroot/SettingsAck_p.java +++ b/htroot/SettingsAck_p.java @@ -268,7 +268,6 @@ public class SettingsAck_p { * Reading out the remote proxy settings * ==================================================================== */ final boolean useRemoteProxy = post.containsKey("remoteProxyUse"); - final boolean useRemoteProxy4Yacy = post.containsKey("remoteProxyUse4Yacy"); final boolean useRemoteProxy4SSL = post.containsKey("remoteProxyUse4SSL"); final String remoteProxyHost = post.get("remoteProxyHost", ""); @@ -289,7 +288,6 @@ public class SettingsAck_p { env.setConfig("remoteProxyPwd", remoteProxyPwd); env.setConfig("remoteProxyNoProxy", remoteProxyNoProxyStr); env.setConfig("remoteProxyUse", useRemoteProxy); - env.setConfig("remoteProxyUse4Yacy", useRemoteProxy4Yacy); env.setConfig("remoteProxyUse4SSL", useRemoteProxy4SSL); /* ==================================================================== diff --git a/htroot/Settings_Proxy.inc b/htroot/Settings_Proxy.inc index 8b247a950..84f469752 100644 --- a/htroot/Settings_Proxy.inc +++ b/htroot/Settings_Proxy.inc @@ -10,14 +10,6 @@   Enables the usage of the remote proxy by yacy - - - - - Specifies if the remote proxy should be used for the communication of this peer to other yacy peers.
- Hint: Enabling this option could cause this peer to remain in junior status. - - diff --git a/htroot/Settings_p.java b/htroot/Settings_p.java index 79341fef7..a96468dea 100644 --- a/htroot/Settings_p.java +++ b/htroot/Settings_p.java @@ -91,7 +91,6 @@ public final class Settings_p { // remote proxy prop.put("remoteProxyUseChecked", env.getConfigBool("remoteProxyUse", false) ? 1 : 0); - prop.put("remoteProxyUse4Yacy", env.getConfigBool("remoteProxyUse4Yacy", true) ? 1 : 0); prop.put("remoteProxyUse4SSL", env.getConfigBool("remoteProxyUse4SSL", true) ? 1 : 0); prop.putHTML("remoteProxyHost", env.getConfig("remoteProxyHost", "")); diff --git a/htroot/Status.java b/htroot/Status.java index 8874a240f..87ff658c3 100644 --- a/htroot/Status.java +++ b/htroot/Status.java @@ -200,7 +200,6 @@ public class Status prop.put("remoteProxy", "1"); prop.putXML("remoteProxy_host", sb.getConfig("remoteProxyHost", "")); prop.putXML("remoteProxy_port", sb.getConfig("remoteProxyPort", "")); - prop.put("remoteProxy_4Yacy", sb.getConfigBool("remoteProxyUse4Yacy", true) ? "0" : "1"); } else { prop.put("remoteProxy", "0"); // not used } diff --git a/source/net/yacy/cora/protocol/http/ProxySettings.java b/source/net/yacy/cora/protocol/http/ProxySettings.java index b5aec00c5..710ab1258 100644 --- a/source/net/yacy/cora/protocol/http/ProxySettings.java +++ b/source/net/yacy/cora/protocol/http/ProxySettings.java @@ -48,10 +48,10 @@ public final class ProxySettings { private static final Object PRESENT = new Object(); public static enum Protocol { - HTTP, HTTPS, YACY + HTTP, HTTPS } - private static boolean use = false, use4YaCy = false, use4ssl = false; + private static boolean use = false, use4ssl = false; public static String host = null, user = "", password = ""; public static int port = 0; public static String[] noProxy = null; @@ -64,9 +64,6 @@ public final class ProxySettings { public static void setProxyUse4HTTPS(boolean use4https0) { use4ssl = use4https0; } - public static void setProxyUse4YaCy(boolean use4YaCy0) { - use4YaCy = use4YaCy0; - } /** * @@ -117,7 +114,6 @@ public final class ProxySettings { assert protocol != null; if (!use) return false; if (protocol == Protocol.HTTPS && !use4ssl) return false; - if (protocol == Protocol.YACY && !use4YaCy) return false; if (allowProxy.containsKey(host)) return true; if (disallowProxy.containsKey(host)) return false; for (String pattern: noProxy) { diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java index b29b83829..4f366acf2 100644 --- a/source/net/yacy/search/Switchboard.java +++ b/source/net/yacy/search/Switchboard.java @@ -3788,7 +3788,6 @@ public final class Switchboard extends serverSwitch { ProxySettings.port = port; ProxySettings.host = host; ProxySettings.setProxyUse4HTTP(ProxySettings.host != null && ProxySettings.host.length() > 0 && getConfigBool("remoteProxyUse", false)); - ProxySettings.setProxyUse4YaCy(getConfig("remoteProxyUse4Yacy", "true").equalsIgnoreCase("true")); ProxySettings.setProxyUse4HTTPS(getConfig("remoteProxyUse4SSL", "true").equalsIgnoreCase("true")); ProxySettings.user = getConfig("remoteProxyUser", "").trim(); ProxySettings.password = getConfig("remoteProxyPwd", "").trim();