Commit 2556ef27 authored by Bill Lynch's avatar Bill Lynch Committed by bill

Fixed NPE, sleep for 1500L ms after delete


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1070 b35dd754-fafc-0310-a699-88a17e54d16e
parent d5c48694
...@@ -52,7 +52,11 @@ ...@@ -52,7 +52,11 @@
pluginJar = new File(pluginDir.getParent(), pluginDir.getName() + ".war"); pluginJar = new File(pluginDir.getParent(), pluginDir.getName() + ".war");
} }
pluginJar.delete(); pluginJar.delete();
response.sendRedirect("plugin-admin.jsp?deletesuccess=false"); try {
Thread.sleep(1500L);
}
catch (Exception ignored) {}
response.sendRedirect("plugin-admin.jsp?deletesuccess=true");
return; return;
} }
...@@ -155,14 +159,15 @@ ...@@ -155,14 +159,15 @@
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(pluginManager.getPlugin(deletePlugin)).getName(); String dirName = pluginManager.getPluginDirectory(plugin).getName();
String pluginName = pluginManager.getName(plugin); if (!"admin".equals(dirName)) {
String pluginDescription = pluginManager.getDescription(plugin); String pluginName = pluginManager.getName(plugin);
String pluginAuthor = pluginManager.getAuthor(plugin); String pluginDescription = pluginManager.getDescription(plugin);
String pluginVersion = pluginManager.getVersion(plugin); String pluginAuthor = pluginManager.getAuthor(plugin);
String pluginVersion = pluginManager.getVersion(plugin);
%> %>
<tr class="jive-<%= (((i%2)==0) ? "even" : "odd") %>"> <tr class="jive-<%= (((i%2)==1) ? "even" : "odd") %>">
<td width="1%"> <td width="1%">
<%= i+1 %> <%= i+1 %>
</td> </td>
...@@ -172,7 +177,7 @@ ...@@ -172,7 +177,7 @@
<td width="60%"> <td width="60%">
<%= pluginDescription != null ? pluginDescription : "" %> &nbsp; <%= pluginDescription != null ? pluginDescription : "" %> &nbsp;
</td> </td>
<td width="5%"> <td width="5%" align="center">
<%= pluginVersion != null ? pluginVersion : "" %> &nbsp; <%= pluginVersion != null ? pluginVersion : "" %> &nbsp;
</td> </td>
<td width="15%"> <td width="15%">
...@@ -190,7 +195,7 @@ ...@@ -190,7 +195,7 @@
</td> </td>
</tr> </tr>
<% <%
}
} }
%> %>
</tbody> </tbody>
......
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