Commit 90c9ea01 authored by Bill Lynch's avatar Bill Lynch Committed by bill

History room fixes, other minor fix


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@389 b35dd754-fafc-0310-a699-88a17e54d16e
parent 5dfa8ec2
......@@ -13,7 +13,8 @@
java.util.*,
org.jivesoftware.messenger.*,
org.jivesoftware.admin.*,
org.jivesoftware.messenger.muc.HistoryStrategy"
org.jivesoftware.messenger.muc.HistoryStrategy,
org.jivesoftware.messenger.muc.MultiUserChatServer"
errorPage="error.jsp"
%>
......@@ -46,8 +47,8 @@
int numMessages = ParamUtils.getIntParameter(request,"numMessages",0);
// Get an audit manager:
// ChatServer chatServer = (ChatServer)admin.getServiceLookup().lookup(ChatServer.class);
// HistoryStrategy historyStrat = chatServer.getHistoryStrategy();
MultiUserChatServer muc = admin.getMultiUserChatServer();
HistoryStrategy historyStrat = muc.getHistoryStrategy();
Map errors = new HashMap();
if (update) {
......@@ -61,14 +62,14 @@
}
if (errors.size() == 0) {
if (policy == ALL) {
// historyStrat.setType(HistoryStrategy.Type.all);
historyStrat.setType(HistoryStrategy.Type.all);
}
else if (policy == NONE) {
// historyStrat.setType(HistoryStrategy.Type.none);
historyStrat.setType(HistoryStrategy.Type.none);
}
else if (policy == NUMBER) {
// historyStrat.setType(HistoryStrategy.Type.number);
// historyStrat.setMaxNumber(numMessages);
historyStrat.setType(HistoryStrategy.Type.number);
historyStrat.setMaxNumber(numMessages);
}
// All done, redirect
%>
......@@ -88,16 +89,16 @@
// Set page vars
if (errors.size() == 0) {
// if (historyStrat.getType() == HistoryStrategy.Type.all) {
// policy = ALL;
// }
// else if (historyStrat.getType() == HistoryStrategy.Type.none) {
// policy = NONE;
// }
// else if (historyStrat.getType() == HistoryStrategy.Type.number) {
// policy = NUMBER;
// }
// numMessages = historyStrat.getMaxNumber();
if (historyStrat.getType() == HistoryStrategy.Type.all) {
policy = ALL;
}
else if (historyStrat.getType() == HistoryStrategy.Type.none) {
policy = NONE;
}
else if (historyStrat.getType() == HistoryStrategy.Type.number) {
policy = NUMBER;
}
numMessages = historyStrat.getMaxNumber();
}
%>
......@@ -107,7 +108,7 @@ Chatrooms can replay conversation histories to provide context to new members jo
much history to store for each room.
</p>
<form action="chatroom-history-settings.jsp">
<form action="chatroom-history-settings.jsp" method="post">
<fieldset>
<legend>Set Chatroom History Policy</legend>
......
......@@ -201,17 +201,8 @@ Below is a summary of user properties. To edit properties, click the "Edit" butt
Email:
</td>
<td>
<% if (user.getInfo().getEmail() == null || "".equals(user.getInfo().getEmail())) { %>
<span style="color:#999">
<i>Not set.</i>
</span>
<% } else { %>
<a href="mailto:<%= user.getInfo().getEmail() %>"><%= user.getInfo().getEmail() %></a>
<% } %>
<a href="mailto:<%= user.getInfo().getEmail() %>"><%= user.getInfo().getEmail() %></a>
&nbsp;
</td>
</tr>
<tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment