minor fixes, removed tuser_task_scheduled from tasklist, also cde over ipam references

Former-commit-id: 46be3614b9aeb9837748149a805427d68a07f566
This commit is contained in:
fbsanchez 2019-03-01 11:08:49 +01:00
parent 52d6dfe815
commit b4170ca285
1 changed files with 6 additions and 21 deletions

View File

@ -337,27 +337,10 @@ class DiscoveryTaskList extends Wizard
}
}
$recon_tasks = db_get_all_rows_sql('SELECT * FROM trecon_task');
$user_groups = implode(',', array_keys(users_get_groups()));
$defined_tasks = db_get_all_rows_filter(
'tuser_task_scheduled',
'id_grupo IN ('.$user_groups.')'
);
$recon_tasks = db_get_all_rows_sql('SELECT * FROM trecon_task');
$user_groups = implode(',', array_keys(users_get_groups()));
if (isset($tasks_console) === true
&& is_array($tasks_console) === true
) {
foreach ($tasks_console as $key => $value) {
$value['parameters'] = unserialize(
$value['parameters']
);
$value['type'] = 'Cron';
array_push($recon_tasks, $value);
}
}
// Show network tasks for Recon Server.
// Show network tasks for Recon Server.
if ($recon_tasks === false) {
$recon_tasks = [];
}
@ -416,7 +399,9 @@ class DiscoveryTaskList extends Wizard
$ipam = false;
if ($task['id_recon_script'] != null) {
$recon_script_name = db_get_value('name', 'trecon_script', 'id_recon_script', $task['id_recon_script']);
if (io_safe_output($recon_script_name) == 'IPAM Recon') {
if (io_safe_output($recon_script_name) == 'IPAM Recon'
&& enterprise_installed()
) {
$subnet_obj = json_decode($task['macros'], true);
$subnet = $subnet_obj['1']['value'];
$tipam_task_id = db_get_value('id', 'tipam_network', 'id_recon_task', $task['id_rt']);