only prepopulate pluginsPending if there is more than 1

This commit is contained in:
Squidly271 2022-10-13 06:51:38 -04:00
parent 0760c9459a
commit 0fbb8f0122
4 changed files with 9 additions and 7 deletions

Binary file not shown.

View File

@ -2,7 +2,7 @@
4e55f7483b661af21a25b677179baffe ./CA_notices.page
4c5d4598e1bafa46bd90c27cbe302122 ./ca_settings.page
e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg
141185e4e1fee9ada93112be1c3277b9 ./include/exec.php
707455867165655b1ef26315dcf224c5 ./include/exec.php
f25b1ed0b1cddfb4ff95a10ced212a0d ./include/helpers.php
116042a918060278e77379b0dd73482c ./include/paths.php
532fffdf939594c143e679da02bd841e ./javascript/libraries.js

View File

@ -2431,13 +2431,15 @@ function saveMultiPluginPending() {
global $caPaths;
$plugin = getPost("plugin","");
$plugins = explode("*",$plugin);
$plugins = array_filter(explode("*",$plugin));
if ( count($plugins) > 1 ) {
exec("mkdir -p {$caPaths['pluginPending']}");
foreach ($plugins as $plg) {
if (! $plg ) continue;
$pluginName = basename($plg);
touch($caPaths['pluginPending'].$pluginName);
}
}
postReturn(['status'=>'ok']);
}