diff --git a/htroot/ConfigBasic.html b/htroot/ConfigBasic.html index 4e6e91d9a..8795295cc 100644 --- a/htroot/ConfigBasic.html +++ b/htroot/ConfigBasic.html @@ -54,7 +54,7 @@ - + diff --git a/htroot/ConfigBasic.java b/htroot/ConfigBasic.java index e85b11c77..c22cad8b9 100644 --- a/htroot/ConfigBasic.java +++ b/htroot/ConfigBasic.java @@ -28,6 +28,7 @@ // javac -classpath .:../classes ConfigBasic_p.java // if the shell's current path is HTROOT +import java.io.File; import java.util.regex.Pattern; import de.anomic.data.translator; @@ -170,6 +171,13 @@ public class ConfigBasic { sb.setConfig(plasmaSwitchboardConstants.INDEX_DIST_ALLOW, false); sb.setConfig(plasmaSwitchboardConstants.INDEX_RECEIVE_ALLOW, false); } + if (post.get("usecase", "").equals("intranet")) { + String repositoryPath = post.get("repositoryPath", "/DATA/HTROOT/repositry"); + File repository = new File(sb.getRootPath(), repositoryPath); + if (repository.exists() && repository.isDirectory()) { + sb.setConfig("repositoryPath", repositoryPath); + } + } } networkName = sb.getConfig(plasmaSwitchboardConstants.NETWORK_NAME, ""); @@ -186,6 +194,7 @@ public class ConfigBasic { prop.put("setUseCase", 0); } prop.put("setUseCase_port", port); + prop.put("setUseCase_repositoryPath", sb.getConfig("repositoryPath", "/DATA/HTROOT/repositry")); // check if values are proper final boolean properPassword = (sb.getConfig(httpd.ADMIN_ACCOUNT_B64MD5, "").length() > 0) || sb.getConfigBool("adminAccountForLocalhost", false);