minor fix, license limits while reapplying queue
This commit is contained in:
parent
3f9bdf65df
commit
6cb9b06cea
|
@ -1343,10 +1343,22 @@ class DiscoveryTaskList extends HTML
|
|||
$ids = array_reduce(
|
||||
$selection,
|
||||
function ($carry, $item) use (&$n_agents) {
|
||||
if (explode('-', $item['id'])[1] === null) {
|
||||
// String is agent-module.
|
||||
$fields = explode('-', $item['id']);
|
||||
$agent_name = $fields[0];
|
||||
$module_name = $fields[1];
|
||||
if ($module_name === null) {
|
||||
// Do not count if already created.
|
||||
if (db_get_value(
|
||||
'id_agente',
|
||||
'tagente',
|
||||
'nombre',
|
||||
io_safe_input($agent_name)
|
||||
) === false
|
||||
) {
|
||||
$n_agents++;
|
||||
}
|
||||
}
|
||||
|
||||
$carry[] = $item['id'];
|
||||
return $carry;
|
||||
|
|
Loading…
Reference in New Issue