Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Overlay for welcome.*
alloff39a7a0d1a8
diff --git a/ChangeLog b/ChangeLogindex cb77c4201..7d16f53e5 100644--- a/ChangeLog+++ b/ChangeLog@@ -6,6 +6,7 @@ version 0.46* ADDED: nice Errorpage for httpauth-fail.* ADDED: support to generate gettext locales and parse them.* CHANGED: new dirlisting support for empty directories instead of copying dir.* into them.+ * CHANGED: do not copy welcome.* / dir.*. We use a overlay instead.version 0.45* UPDATED: new Design of search pagediff --git a/htroot/htdocsdefault/welcome.html b/htroot/www/welcome.htmlsimilarity index 100%rename from htroot/htdocsdefault/welcome.htmlrename to htroot/www/welcome.htmldiff --git a/htroot/htdocsdefault/welcome.java b/htroot/www/welcome.javasimilarity index 97%rename from htroot/htdocsdefault/welcome.javarename to htroot/www/welcome.javaindex 2aa7fe1ba..263ff2d76 100644--- a/htroot/htdocsdefault/welcome.java+++ b/htroot/www/welcome.java@@ -1,3 +1,4 @@+package www;// welcome.java// -----------------------// part of the AnomicHTTPD caching proxydiff --git a/source/migration.java b/source/migration.javaindex 5befc912e..b0d60426a 100644--- a/source/migration.java+++ b/source/migration.java@@ -50,7 +50,7 @@ public class migration {//SVN constantspublic static final int USE_WORK_DIR=1389; //wiki & messages in DATA/WORKpublic static final int TAGDB_WITH_TAGHASH=1635; //tagDB keys are tagHashes instead of plain tagname.- public static final int NEW_DIRLISTING_OVERLAY=2294;+ public static final int NEW_OVERLAYS=2299;public static void main(String[] args) {}@@ -64,22 +64,37 @@ public class migration {if(fromRev < TAGDB_WITH_TAGHASH){migrateBookmarkTagsDB(sb);}- if(fromRev < NEW_DIRLISTING_OVERLAY){- File file=new File(sb.htDocsPath, "share/dir.html");- if(file.exists())- file.delete();- file=new File(sb.htDocsPath, "share/dir.class");- if(file.exists())- file.delete();- file=new File(sb.htDocsPath, "share/dir.java");- if(file.exists())- file.delete();+ if(fromRev < NEW_OVERLAYS){+ migrateDefaultFiles(sb);}serverLog.logInfo("MIGRATION", "Migrating from "+String.valueOf(fromRev)+ " to "+String.valueOf(toRev));installSkins(sb);migrate(sb);}}+ /*+ * remove the static defaultfiles. We use them through a overlay now.+ */+ public static void migrateDefaultFiles(plasmaSwitchboard sb){+ File file=new File(sb.htDocsPath, "share/dir.html");+ if(file.exists())+ file.delete();+ file=new File(sb.htDocsPath, "share/dir.class");+ if(file.exists())+ file.delete();+ file=new File(sb.htDocsPath, "share/dir.java");+ if(file.exists())+ file.delete();+ file=new File(sb.htDocsPath, "www/welcome.html");+ if(file.exists())+ file.delete();+ file=new File(sb.htDocsPath, "www/welcome.java");+ if(file.exists())+ file.delete();+ file=new File(sb.htDocsPath, "www/welcome.class");+ if(file.exists())+ file.delete();+ }public static void installSkins(plasmaSwitchboard sb){final File skinsPath = new File(sb.getRootPath(), sb.getConfig("skinsPath", "DATA/SKINS"));final File defaultSkinsPath = new File(sb.getRootPath(), "skins");diff --git a/source/yacy.java b/source/yacy.javaindex 949a34569..e2d42dc62 100644--- a/source/yacy.java+++ b/source/yacy.java@@ -337,13 +337,6 @@ public final class yacy {final File wwwDefaultPath = new File(htDocsPath, "www");if (!(wwwDefaultPath.exists())) wwwDefaultPath.mkdir();- final File wwwDefaultClass = new File(wwwDefaultPath, "welcome.class");- //if ((!(wwwDefaultClass.exists())) || (wwwDefaultClass.length() != (new File(htRootPath, "htdocsdefault/welcome.class")).length())) try {- if((new File(htRootPath, "htdocsdefault/welcome.java")).exists())- serverFileUtils.copy(new File(htRootPath, "htdocsdefault/welcome.java"), new File(wwwDefaultPath, "welcome.java"));- serverFileUtils.copy(new File(htRootPath, "htdocsdefault/welcome.class"), wwwDefaultClass);- serverFileUtils.copy(new File(htRootPath, "htdocsdefault/welcome.html"), new File(wwwDefaultPath, "welcome.html"));- //} catch (IOException e) {}final File shareDefaultPath = new File(htDocsPath, "share");if (!(shareDefaultPath.exists())) shareDefaultPath.mkdir();