mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
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:
parent
01ef85316d
commit
1f3eaf9f8e
|
@ -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)
|
||||
|
|
|
@ -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) {
|
||||
|
|
2
htroot/env/templates/header.template
vendored
2
htroot/env/templates/header.template
vendored
|
@ -54,7 +54,7 @@
|
|||
<tr><td class="MenuItem"> <a href="/www/" class="MenuItemLink">Home Page</a></td></tr>
|
||||
<tr><td class="MenuItem"> <a href="/share/" class="MenuItemLink">File Share</a></td></tr>
|
||||
<tr><td class="MenuItem"> <a href="/Wiki.html" class="MenuItemLink">Wiki</a></td></tr>
|
||||
<tr><td class="MenuItem"> <img border="0" src="/env/grafics/lock.gif" align="top"> <a href="/Messages_p.html" class="MenuItemLink">Messages</a> <img border="0" src="/env/grafics/notifier.gif" align="center"></td></tr>
|
||||
<tr><td class="MenuItem"> <img border="0" src="/env/grafics/lock.gif" align="top"> <a href="/Messages_p.html" class="MenuItemLink">Messages</a> <img border="0" src="notifier.gif" align="center"></td></tr>
|
||||
<tr><td class="MenuItem"> <img border="0" src="/env/grafics/lock.gif" align="top"> <a href="/EditProfile_p.html" class="MenuItemLink">Personal Profile</a></td></tr>
|
||||
<tr><td class="MenuSpacer"></td></tr>
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user