mirror of
https://github.com/unraid/webgui.git
synced 2026-03-15 23:41:29 -05:00
Merge pull request #441 from Squidly271/master
Prevent update notification if plugin is not compatible
This commit is contained in:
@@ -30,8 +30,9 @@ foreach (glob("/tmp/plugins/*.plg", GLOB_NOSORT) as $file) {
|
||||
if (in_array($name,$builtin)) continue;
|
||||
$old = plugin('version', "/var/log/plugins/$name.plg");
|
||||
$new = plugin('version', $file);
|
||||
$min = plugin('min',$file) ?: $current['version'];
|
||||
// silently suppress bad download of PLG file
|
||||
if (strcmp($new, $old) > 0) {
|
||||
if ( (strcmp($new, $old) > 0) && ! version_compare($min,$current['version'],">") ) {
|
||||
exec("$notify -e ".escapeshellarg("Plugin - $name [$new]")." -s ".escapeshellarg("Notice [$server] - Version update $new")." -d ".escapeshellarg("A new version of $name is available")." -i ".escapeshellarg("normal $output")." -x");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user