forked from I2P_Developers/i2p.i2p
check for mismatched versions
This commit is contained in:
@ -209,6 +209,8 @@ public class PluginUpdateHandler extends UpdateHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String sudVersion = TrustedUpdate.getVersionString(f);
|
||||||
f.delete();
|
f.delete();
|
||||||
|
|
||||||
String appName = props.getProperty("name");
|
String appName = props.getProperty("name");
|
||||||
@ -219,6 +221,11 @@ public class PluginUpdateHandler extends UpdateHandler {
|
|||||||
updateStatus("<b>" + _("Plugin from {0} has invalid name or version", url) + "</b>");
|
updateStatus("<b>" + _("Plugin from {0} has invalid name or version", url) + "</b>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!version.equals(sudVersion)) {
|
||||||
|
to.delete();
|
||||||
|
updateStatus("<b>" + _("Plugin {0} has mismatched versions", appName) + "</b>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// todo compare sud version with property version
|
// todo compare sud version with property version
|
||||||
|
|
||||||
@ -242,7 +249,7 @@ public class PluginUpdateHandler extends UpdateHandler {
|
|||||||
if (destDir.exists()) {
|
if (destDir.exists()) {
|
||||||
if (Boolean.valueOf(props.getProperty("install-only")).booleanValue()) {
|
if (Boolean.valueOf(props.getProperty("install-only")).booleanValue()) {
|
||||||
to.delete();
|
to.delete();
|
||||||
updateStatus("<b>" + _("Downloaded plugin is not for upgrading but the plugin is already installed", url) + "</b>");
|
updateStatus("<b>" + _("Downloaded plugin is for new installs only, but the plugin is already installed", url) + "</b>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ button span.hide{
|
|||||||
</p><hr><div class="formaction">
|
</p><hr><div class="formaction">
|
||||||
<input type="submit" name="action" value="<%=intl._("Save WebApp Configuration")%>" />
|
<input type="submit" name="action" value="<%=intl._("Save WebApp Configuration")%>" />
|
||||||
</div></div><h3><a name="webapp"></a><%=intl._("Plugin Configuration")%></h3><p>
|
</div></div><h3><a name="webapp"></a><%=intl._("Plugin Configuration")%></h3><p>
|
||||||
<%=intl._("The plugins listed below are started by the webConsole client and run in the same JVM as the router. They are usually web applications accessible through the router console.")%>
|
<%=intl._("The plugins listed below are started by the webConsole client.")%>
|
||||||
</p><div class="wideload"><p>
|
</p><div class="wideload"><p>
|
||||||
<jsp:getProperty name="clientshelper" property="form3" />
|
<jsp:getProperty name="clientshelper" property="form3" />
|
||||||
</p><hr><div class="formaction">
|
</p><hr><div class="formaction">
|
||||||
|
Reference in New Issue
Block a user