Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix for http://forum.yacy-websuche.de/viewtopic.php?f=6&t=1347&hilit=&p=9216#p9216
orbiter5f4191304321
diff --git a/htroot/ConfigBasic.java b/htroot/ConfigBasic.javaindex a2857379e..c6cde30b4 100644--- a/htroot/ConfigBasic.java+++ b/htroot/ConfigBasic.java@@ -135,29 +135,23 @@ public class ConfigBasic {// set a use caseString networkName = sb.getConfig("network.unit.name", "");if (post != null && post.containsKey("usecase")) {- if (post.get("usecase", "").equals("freeworld")) {- if (!networkName.equals("freeworld")) {- // switch to freeworld network- sb.switchNetwork("defaults/yacy.network.freeworld.unit");- }+ if (post.get("usecase", "").equals("freeworld") && !networkName.equals("freeworld")) {+ // switch to freeworld network+ sb.switchNetwork("defaults/yacy.network.freeworld.unit");// switch to p2p modesb.setConfig(plasmaSwitchboard.INDEX_DIST_ALLOW, true);sb.setConfig(plasmaSwitchboard.INDEX_RECEIVE_ALLOW, true);}- if (post.get("usecase", "").equals("portal")) {- if (!networkName.equals("webportal")) {- // switch to webportal network- sb.switchNetwork("defaults/yacy.network.webportal.unit");- }+ if (post.get("usecase", "").equals("portal") && !networkName.equals("webportal")) {+ // switch to webportal network+ sb.switchNetwork("defaults/yacy.network.webportal.unit");// switch to robinson modesb.setConfig(plasmaSwitchboard.INDEX_DIST_ALLOW, false);sb.setConfig(plasmaSwitchboard.INDEX_RECEIVE_ALLOW, false);}- if (post.get("usecase", "").equals("intranet")) {- if (!networkName.equals("intranet")) {- // switch to intranet network- sb.switchNetwork("defaults/yacy.network.intranet.unit");- }+ if (post.get("usecase", "").equals("intranet") && !networkName.equals("intranet")) {+ // switch to intranet network+ sb.switchNetwork("defaults/yacy.network.intranet.unit");// switch to p2p mode: enable ad-hoc networks between intranet userssb.setConfig(plasmaSwitchboard.INDEX_DIST_ALLOW, true);sb.setConfig(plasmaSwitchboard.INDEX_RECEIVE_ALLOW, true);