Commit 66ab17ed authored by Matt Tucker's avatar Matt Tucker Committed by matt

Unload plugin after deleting.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1072 b35dd754-fafc-0310-a699-88a17e54d16e
parent ed321958
...@@ -52,10 +52,7 @@ ...@@ -52,10 +52,7 @@
pluginJar = new File(pluginDir.getParent(), pluginDir.getName() + ".war"); pluginJar = new File(pluginDir.getParent(), pluginDir.getName() + ".war");
} }
pluginJar.delete(); pluginJar.delete();
try { pluginManager.unloadPlugin(pluginDir.getName());
Thread.sleep(1500L);
}
catch (Exception ignored) {}
response.sendRedirect("plugin-admin.jsp?deletesuccess=true"); response.sendRedirect("plugin-admin.jsp?deletesuccess=true");
return; return;
} }
...@@ -148,8 +145,9 @@ ...@@ -148,8 +145,9 @@
</thead> </thead>
<tbody> <tbody>
<% <%
if (plugins.size() == 0) { // If only the admin plugin is installed, show "none".
if (plugins.size() == 1) {
%> %>
<tr> <tr>
<td align="center" colspan="7"><fmt:message key="plugin.admin.no_plugin" /></td> <td align="center" colspan="7"><fmt:message key="plugin.admin.no_plugin" /></td>
...@@ -160,6 +158,7 @@ ...@@ -160,6 +158,7 @@
for (int i=0; i<plugins.size(); i++) { for (int i=0; i<plugins.size(); i++) {
Plugin plugin = plugins.get(i); Plugin plugin = plugins.get(i);
String dirName = pluginManager.getPluginDirectory(plugin).getName(); String dirName = pluginManager.getPluginDirectory(plugin).getName();
// Skip the admin plugin.
if (!"admin".equals(dirName)) { if (!"admin".equals(dirName)) {
String pluginName = pluginManager.getName(plugin); String pluginName = pluginManager.getName(plugin);
String pluginDescription = pluginManager.getDescription(plugin); String pluginDescription = pluginManager.getDescription(plugin);
...@@ -171,7 +170,7 @@ ...@@ -171,7 +170,7 @@
<td width="1%"> <td width="1%">
<%= i+1 %> <%= i+1 %>
</td> </td>
<td width="20%"> <td width="20%" nowrap>
<%= (pluginName != null ? pluginName : dirName) %> &nbsp; <%= (pluginName != null ? pluginName : dirName) %> &nbsp;
</td> </td>
<td width="60%"> <td width="60%">
...@@ -180,7 +179,7 @@ ...@@ -180,7 +179,7 @@
<td width="5%" align="center"> <td width="5%" align="center">
<%= pluginVersion != null ? pluginVersion : "" %> &nbsp; <%= pluginVersion != null ? pluginVersion : "" %> &nbsp;
</td> </td>
<td width="15%"> <td width="15%" nowrap>
<%= pluginAuthor != null ? pluginAuthor : "" %> &nbsp; <%= pluginAuthor != null ? pluginAuthor : "" %> &nbsp;
</td> </td>
<td width="1%" align="center"> <td width="1%" align="center">
......
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