Commit b65a6f8c authored by Derek DeMoro's avatar Derek DeMoro Committed by derek

1) Fixed PluginDownloadManager for AJAX.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5532 b35dd754-fafc-0310-a699-88a17e54d16e
parent b23f45a1
......@@ -11,6 +11,8 @@
package org.jivesoftware.wildfire.update;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.Log;
import org.jivesoftware.wildfire.XMPPServer;
/**
......@@ -44,7 +46,7 @@ public class PluginDownloadManager {
/**
* Installs a new plugin into Wildfire.
*
* @param url the url of the plugin to install.
* @param url the url of the plugin to install.
* @param hashCode the matching hashcode of the <code>AvailablePlugin</code>.
* @return the hashCode.
*/
......@@ -60,4 +62,31 @@ public class PluginDownloadManager {
return status;
}
/**
* Updates the PluginList from the server. Please note, this method is used with javascript calls and will not
* be found with a find usages.
*
* @return true if the plugin list was updated.
*/
public boolean updatePluginsList() {
UpdateManager updateManager = XMPPServer.getInstance().getUpdateManager();
try {
// Todo: Unify update checking into one xml file. Have the update check set the last check property.
updateManager.checkForServerUpdate(true);
updateManager.checkForPluginsUpdates(true);
// Keep track of the last time we checked for updates
JiveGlobals.setProperty("update.lastCheck",
String.valueOf(System.currentTimeMillis()));
return true;
}
catch (Exception e) {
Log.error(e);
}
return false;
}
}
\ No newline at end of file
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