git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@344 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 20 years ago
parent 82d78fdab7
commit 63f9570d3a

@ -54,7 +54,6 @@ import java.util.Properties;
import de.anomic.http.httpHeader;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
import de.anomic.tools.unHtml;
public class EditProfile_p {
@ -84,17 +83,17 @@ public class EditProfile_p {
profile.setProperty("comment", (String)post.get("comment"));
}
prop.put("name", (new unHtml(profile.getProperty("name", ""))).un());
prop.put("nickname", (new unHtml(profile.getProperty("nickname", ""))).un());
prop.put("homepage", (new unHtml(profile.getProperty("homepage", ""))).un());
prop.put("email", (new unHtml(profile.getProperty("email", ""))).un());
prop.put("name", profile.getProperty("name", ""));
prop.put("nickname", profile.getProperty("nickname", ""));
prop.put("homepage", profile.getProperty("homepage", ""));
prop.put("email", profile.getProperty("email", ""));
prop.put("icq", (new unHtml(profile.getProperty("icq", ""))).un());
prop.put("jabber", (new unHtml(profile.getProperty("jabber", ""))).un());
prop.put("yahoo", (new unHtml(profile.getProperty("yahoo", ""))).un());
prop.put("msn", (new unHtml(profile.getProperty("msn", ""))).un());
prop.put("icq", profile.getProperty("icq", ""));
prop.put("jabber", profile.getProperty("jabber", ""));
prop.put("yahoo", profile.getProperty("yahoo", ""));
prop.put("msn", profile.getProperty("msn", ""));
prop.put("comment", (new unHtml(profile.getProperty("comment", ""))).un());
prop.put("comment", profile.getProperty("comment", ""));
FileOutputStream fileOut = null;
try{

@ -56,7 +56,7 @@ import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.server.serverFileUtils;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
import de.anomic.tools.unHtml;
import de.anomic.tools.bbCode;
public class Messages_p {
@ -69,6 +69,7 @@ public class Messages_p {
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
serverObjects prop = new serverObjects();
bbCode bb = new bbCode();
String action = ((post == null) ? "list" : post.get("action", "list"));
String messages = "";
@ -101,7 +102,7 @@ public class Messages_p {
messages += "<td>" + dateString(message.date()) + "</td>";
messages += "<td>" + message.author() + "</td>";
messages += "<td>" + message.recipient() + "</td>";
messages += "<td>" + (new unHtml(message.subject())).un() + "</td>";
messages += "<td>" + bb.bb(message.subject()) + "</td>";
messages += "<td>" +
"<a href=\"Messages_p.html?action=view&object=" + key + "\">view</a>&nbsp;/&nbsp;" +
"<a href=\"MessageSend_p.html?hash=" + message.authorHash() + "&subject=Re: " + message.subject() + "\">reply</a>&nbsp;/&nbsp;" +
@ -122,8 +123,8 @@ public class Messages_p {
messages += "<tr><td class=\"MenuHeader\">From:</td><td class=\"MessageBackground\">" + message.author() + "</td></tr>";
messages += "<tr><td class=\"MenuHeader\">To:</td><td class=\"MessageBackground\">" + message.recipient() + "</td></tr>";
messages += "<tr><td class=\"MenuHeader\">Send Date:</td><td class=\"MessageBackground\">" + dateString(message.date()) + "</td></tr>";
messages += "<tr><td class=\"MenuHeader\">Subject:</td><td class=\"MessageBackground\">" + (new unHtml(message.subject())).un() + "</td></tr>";
messages += "<tr><td class=\"MessageBackground\" colspan=\"2\">" + (new unHtml(new String(message.message()))).un() + "</td></tr>";
messages += "<tr><td class=\"MenuHeader\">Subject:</td><td class=\"MessageBackground\">" + bb.bb(message.subject()) + "</td></tr>";
messages += "<tr><td class=\"MessageBackground\" colspan=\"2\">" + bb.bb(new String(message.message())) + "</td></tr>";
messages += "<tr><td class=\"MenuHeader\">Action:</td>" +
"<td class=\"MessageBackground\">" +
"<a href=\"Messages_p.html\">inbox</a>&nbsp;/&nbsp;" +

@ -57,7 +57,7 @@ import de.anomic.server.serverSwitch;
import de.anomic.yacy.yacyClient;
import de.anomic.yacy.yacyCore;
import de.anomic.yacy.yacySeed;
import de.anomic.tools.unHtml;
import de.anomic.tools.bbCode;
public class ViewProfile {
@ -65,6 +65,7 @@ public class ViewProfile {
//listManager.switchboard = (plasmaSwitchboard) env;
serverObjects prop = new serverObjects();
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
bbCode bb = new bbCode();
if ((post != null) && (post.containsKey("hash")) && (yacyCore.seedDB != null)) { //no nullpointer error..
yacySeed seed = yacyCore.seedDB.getConnected((String)post.get("hash"));
@ -105,7 +106,7 @@ public class ViewProfile {
while (i.hasNext()) {
entry = (Map.Entry) i.next();
String key=(String)entry.getKey();
String value=(new unHtml(((String)entry.getValue()).replaceAll("\r","").replaceAll("\\\\n","\n"))).un();
String value=bb.bb( ((String)entry.getValue()).replaceAll("\r","").replaceAll("\\\\n","\n") );
//all known Keys which should be set as they are
if(knownKeys.contains(key)){
prop.put("success_"+key, 1);

Loading…
Cancel
Save