Commit 2704be23 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Improved the way the service name is edited.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@183 b35dd754-fafc-0310-a699-88a17e54d16e
parent e6a063bf
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
java.util.HashMap, java.util.HashMap,
java.util.Map, java.util.Map,
org.jivesoftware.messenger.XMPPServerInfo, org.jivesoftware.messenger.XMPPServerInfo,
org.jivesoftware.messenger.muc.MultiUserChatServer" org.jivesoftware.messenger.muc.MultiUserChatServer,
org.jivesoftware.messenger.JiveGlobals"
%> %>
<% <%
// Handle a cancel // Handle a cancel
...@@ -33,8 +34,6 @@ ...@@ -33,8 +34,6 @@
<%@ include file="top.jsp" %> <%@ include file="top.jsp" %>
<% // Get parameters <% // Get parameters
boolean save = ParamUtils.getBooleanParameter(request,"save"); boolean save = ParamUtils.getBooleanParameter(request,"save");
boolean success = false; boolean success = false;
...@@ -57,6 +56,11 @@ ...@@ -57,6 +56,11 @@
else { else {
name = admin.getServerInfo().getName() == null ? "" : admin.getServerInfo().getName(); name = admin.getServerInfo().getName() == null ? "" : admin.getServerInfo().getName();
muc = admin.getMultiUserChatServer().getServiceName() == null ? "" : admin.getMultiUserChatServer().getServiceName(); muc = admin.getMultiUserChatServer().getServiceName() == null ? "" : admin.getMultiUserChatServer().getServiceName();
// Remove the server address part from the MUC domain name.
int index = muc.indexOf("." + name);
if (index > 0) {
muc = muc.substring(0, index);
}
} }
%> %>
...@@ -94,7 +98,7 @@ Use the form below to edit Multi-User Chat server properties. ...@@ -94,7 +98,7 @@ Use the form below to edit Multi-User Chat server properties.
Multi User Chat server name: Multi User Chat server name:
</td> </td>
<td> <td>
<input type="text" size="30" maxlength="150" name="mucname" value="<%= muc %>"> <input type="text" size="30" maxlength="150" name="mucname" value="<%= muc %>">.<%=name%>
<% if (errors.get("mucname") != null) { %> <% if (errors.get("mucname") != null) { %>
......
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