Don't allow plugin updates to same version

Should solve the odd problem with CA where updates effectively remove the plugin, due to user clicking the CA link to update itself, but auto update (eg) has already updated the plugin (ie: auto update updated it while the CA page was open)
This commit is contained in:
Squidly271
2019-06-08 11:32:13 -04:00
committed by GitHub
parent a4f17cf176
commit d90595c052

View File

@@ -624,6 +624,11 @@ if ($method == "update") {
echo "plugin: installed Unraid version is too high, require at most version $max\n";
exit(1);
}
// check for a reinstall of same version
if (strcmp(plugin("version",$installed_plugin_file,$error),plugin("version",$plugin_file,$error1)) == 0) {
echo "Not reinstalling same version\n";
exit(1);
}
// install the updated plugin
if (plugin("install", $plugin_file, $error) === false) {
echo "plugin: $error\n";