removed the HTDOCS repository concept because the concept to host files

on the YaCy http server is obsolete; YaCy can index file:// and smb://
paths
pull/1/head
orbiter 11 years ago
parent 5611d45b65
commit b3ebd38079

@ -207,14 +207,6 @@ htDefaultPath=htroot
# the htdocs path shares its content with the htroot path
htDocsPath = DATA/HTDOCS
# alternative path for the repository path of the web server: the URL
# http://localhost:8090/repository
# points to DATA/HTDOCS/repository, but can be altered with this repository path
# hint: the repository path is the default path for intranet indexing. The easiest ways
# to do a indexing of the local storage system is to set a path here for the repository
# that points to the root path of the files that shall be indexed
repositoryPath=DATA/HTDOCS/repository
# the default files (typically index.html), if no file name is given
# The complete path to this file is created by combination with the rootPath
# you can set a list of defaults, separated by comma

@ -63,10 +63,7 @@
<tr>
<td valign="top"><label for="usecaseFreeworld">Join and support the global network 'freeworld', search the web with an uncensored user-owned search network</label></td>
<td valign="top"><label for="usecasePortal">Your YaCy installation behaves independently from other peers and you define your own web index by starting your own web crawl. This can be used to search your own web pages or to define a topic-oriented search portal.</label></td>
<td valign="top"><label for="usecaseIntranet">Create a search portal for your intranet or web pages or your (shared) file system. URLs may be used with http/https/ftp and a local domain name or IP, or with an URL of the form file:///&lt;path&gt; or smb://&lt;server&gt;/&lt;path&gt;<br/>
Files may also be shared with the YaCy server, assign a path here:
<input type="text" name="repositoryPath" size="37" value="#[repositoryPath]#" /><br/>
This path can be accessed at <a href="http://localhost:#[port]#/repository/">http://localhost:#[port]#/repository</a></label>. Use that path as crawl start point.
<td valign="top"><label for="usecaseIntranet">Create a search portal for your intranet or web pages or your (shared) file system. URLs may be used with http/https/ftp and a local domain name or IP, or with an URL of the form file:///&lt;path&gt; or smb://&lt;server&gt;/&lt;path&gt;<br/>
</td>
</tr>
</table>

@ -211,13 +211,6 @@ public class ConfigBasic {
sb.setConfig(SwitchboardConstants.SEARCH_VERIFY, "cacheonly"); // nocache,iffresh,ifexist,cacheonly,false
sb.setConfig(SwitchboardConstants.SEARCH_VERIFY_DELETE, "false");
}
if ("intranet".equals(post.get("usecase", ""))) {
final String repositoryPath = post.get("repositoryPath", "/DATA/HTROOT/repository");
final File repository = ((repositoryPath.length() > 0 && repositoryPath.charAt(0) == '/') || (repositoryPath.length() > 1 && repositoryPath.charAt(1) == ':')) ? new File(repositoryPath) : new File(sb.getDataPath(), repositoryPath);
if (repository.exists() && repository.isDirectory()) {
sb.setConfig("repositoryPath", repositoryPath);
}
}
}
networkName = sb.getConfig(SwitchboardConstants.NETWORK_NAME, "");

@ -101,10 +101,6 @@ public final class HTTPDFileHandler {
if (!(htDocsPath.exists())) htDocsPath.mkdirs();
}
// create a repository path
final File repository = new File(htDocsPath, "repository");
if (!repository.exists()) repository.mkdirs();
// create htLocaleDefault, htLocalePath
if (htDefaultPath == null) htDefaultPath = theSwitchboard.getAppPath("htDefaultPath", SwitchboardConstants.HTROOT_PATH_DEFAULT);
if (htLocalePath == null) htLocalePath = theSwitchboard.getDataPath("locale.translated_html", "DATA/LOCALE/htroot");
@ -123,8 +119,6 @@ public final class HTTPDFileHandler {
* @param path relative from htroot */
public static File getLocalizedFile(final String path){
String localeSelection = switchboard.getConfig("locale.language","default");
if (path.startsWith("/repository/"))
return new File(switchboard.getConfig("repositoryPath", "DATA/HTDOCS/repository"), path.substring(11));
if (!(localeSelection.equals("default"))) {
final File localePath = new File(htLocalePath, localeSelection + '/' + path);
if (localePath.exists()) return localePath; // avoid "NoSuchFile" troubles if the "localeSelection" is misspelled

Loading…
Cancel
Save