Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

use DATA/HTDOCS for notifier.gif. Works even if htroot is readonly

allo1f3eaf9f8ef4
diff --git a/ChangeLog b/ChangeLog
index 637e4e04c..40d16dc9e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,8 @@ version 0.424svn
* FIXED: some Filemodes were set wrong (theli)
* FIXED: minor bug-fix in Cache for some rare URLs (borg-0300)
* ADDED: The YaCy-Bookmarkssystem (allo)
+ * UPDATED: New Searchstyle
+ * FIXED: notifier.gif works even when only DATA is writable
version 0.40 (8/21/2005):
* The Server now provides the virtuel Header IS_ADMIN (Alexander Schier)
diff --git a/htroot/Messages_p.java b/htroot/Messages_p.java
index 847d8e8fd..fe4ef392c 100644
--- a/htroot/Messages_p.java
+++ b/htroot/Messages_p.java
@@ -78,7 +78,7 @@ public class Messages_p {
// first reset notification
File notifierSource = new File(switchboard.getRootPath(), switchboard.getConfig("htRootPath", "htroot") + "/env/grafics/empty.gif");
- File notifierDest = new File(switchboard.getRootPath(), switchboard.getConfig("htRootPath", "htroot") + "/env/grafics/notifier.gif");
+ File notifierDest = new File(switchboard.getConfig("htDocsPath", "DATA/HTDOCS"), "notifier.gif");
try {
serverFileUtils.copy(notifierSource, notifierDest);
} catch (IOException e) {
diff --git a/htroot/env/templates/header.template b/htroot/env/templates/header.template
index 6f1c22362..7d87ea548 100644
--- a/htroot/env/templates/header.template
+++ b/htroot/env/templates/header.template
@@ -54,7 +54,7 @@
<tr><td class="MenuItem">&nbsp;<a href="/www/" class="MenuItemLink">Home&nbsp;Page</a></td></tr>
<tr><td class="MenuItem">&nbsp;<a href="/share/" class="MenuItemLink">File&nbsp;Share</a></td></tr>
<tr><td class="MenuItem">&nbsp;<a href="/Wiki.html" class="MenuItemLink">Wiki</a></td></tr>
- <tr><td class="MenuItem">&nbsp;<img border="0" src="/env/grafics/lock.gif" align="top">&nbsp;<a href="/Messages_p.html" class="MenuItemLink">Messages</a>&nbsp;<img border="0" src="/env/grafics/notifier.gif" align="center"></td></tr>
+ <tr><td class="MenuItem">&nbsp;<img border="0" src="/env/grafics/lock.gif" align="top">&nbsp;<a href="/Messages_p.html" class="MenuItemLink">Messages</a>&nbsp;<img border="0" src="notifier.gif" align="center"></td></tr>
<tr><td class="MenuItem">&nbsp;<img border="0" src="/env/grafics/lock.gif" align="top">&nbsp;<a href="/EditProfile_p.html" class="MenuItemLink">Personal Profile</a></td></tr>
<tr><td class="MenuSpacer"></td></tr>
diff --git a/htroot/yacy/message.java b/htroot/yacy/message.java
index 5d01aa95d..6f7b24f9a 100644
--- a/htroot/yacy/message.java
+++ b/htroot/yacy/message.java
@@ -58,6 +58,7 @@ import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.server.serverFileUtils;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
+import de.anomic.server.logging.serverLog;
import de.anomic.tools.crypt;
import de.anomic.yacy.yacyCore;
import de.anomic.yacy.yacySeed;
@@ -142,11 +143,12 @@ public final class message {
// finally write notification
File notifierSource = new File(sb.getRootPath(), sb.getConfig("htRootPath","htroot") + "/env/grafics/message.gif");
- File notifierDest = new File(sb.getRootPath(), sb.getConfig("htRootPath","htroot") + "/env/grafics/notifier.gif");
+ File notifierDest = new File(sb.getConfig("htDocsPath", "DATA/HTDOCS"), "notifier.gif");
try {
serverFileUtils.copy(notifierSource, notifierDest);
} catch (IOException e) {
- System.out.println("NEW MESSAGE ARRIVED! (error: " + e.getMessage() + ")");
+ serverLog.logSevere("MESSAGE", "NEW MESSAGE ARRIVED! (error: " + e.getMessage() + ")");
+
};
}
// System.out.println("respond = " + prop.toString());
diff --git a/source/yacy.java b/source/yacy.java
index e4242e32f..2adcded86 100644
--- a/source/yacy.java
+++ b/source/yacy.java
@@ -53,7 +53,6 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.URL;
-import java.util.ConcurrentModificationException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -308,9 +307,10 @@ public final class yacy {
//final File htTemplatePath = new File(homePath, sb.getConfig("htTemplatePath","htdocs"));
// create default notifier picture
+ //TODO: Use templates instead of copying images ...
if (!((new File(htRootPath, "env/grafics/notifier.gif")).exists())) try {
serverFileUtils.copy(new File(htRootPath, "env/grafics/empty.gif"),
- new File(htRootPath, "env/grafics/notifier.gif"));
+ new File(htDocsPath, "notifier.gif"));
} catch (IOException e) {}
if (!(htDocsPath.exists())) htDocsPath.mkdir();