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

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1526 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
allo 2006-02-03 21:21:42 +00:00
parent 01ef85316d
commit 1f3eaf9f8e
5 changed files with 10 additions and 6 deletions

View File

@ -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)

View File

@ -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) {

View File

@ -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>

View File

@ -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());

View File

@ -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();