mirror of
https://github.com/unraid/webgui.git
synced 2025-12-30 22:20:23 -06:00
refactor: Simplify plugin option handling by removing unnecessary flags. Update logic to determine if a plugin is forced based solely on the presence of options, enhancing clarity in plugin processing.
This commit is contained in:
@@ -618,8 +618,7 @@ if ($method == 'install' || $method == 'download') {
|
||||
done(1);
|
||||
}
|
||||
}
|
||||
$non_flag_options = array_diff($options, ['force', 'forced']);
|
||||
$forced = in_array('force', $options, true) || in_array('forced', $options, true) || !empty($non_flag_options);
|
||||
$forced = !empty($options);
|
||||
if (pathinfo($plugin, PATHINFO_EXTENSION) != "plg") {
|
||||
write("plugin: $plugin is not a plg file\n");
|
||||
done(1);
|
||||
|
||||
Reference in New Issue
Block a user