mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
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(
|
$ids = array_reduce(
|
||||||
$selection,
|
$selection,
|
||||||
function ($carry, $item) use (&$n_agents) {
|
function ($carry, $item) use (&$n_agents) {
|
||||||
if (explode('-', $item['id'])[1] === null) {
|
|
||||||
// String is agent-module.
|
// 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++;
|
$n_agents++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$carry[] = $item['id'];
|
$carry[] = $item['id'];
|
||||||
return $carry;
|
return $carry;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user