From d0ebee12ffd197cbea5b797018d0e09eb9b842bd Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 29 Apr 2024 13:12:47 +0200 Subject: [PATCH] #17267 pagination token --- pandora_console/include/ajax/module.php | 12 ++++++------ pandora_console/include/functions_agents.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 18500c4d8d..86ea0cb301 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -1543,7 +1543,12 @@ if (check_login()) { include_once $config['homedir'].'/include/functions_graph.php'; $agent = get_parameter('agent'); $id_agente = $agent; - $network_interfaces_by_agents = agents_get_network_interfaces([$agent], false, true, get_parameter('offset', 0)); + $paginate_module = false; + if (isset($config['paginate_module']) === true) { + $paginate_module = (bool) $config['paginate_module']; + } + + $network_interfaces_by_agents = agents_get_network_interfaces([$agent], false, $paginate_module, get_parameter('offset', 0)); $count_network_incerfaces = agents_get_network_interfaces([$agent], false, false, 0, true); $network_interfaces = []; if (empty($network_interfaces_by_agents) === false && empty($network_interfaces_by_agents[$id_agente]) === false) { @@ -1566,11 +1571,6 @@ if (check_login()) { $table_interface->data = []; $event_text_cont = 0; - $paginate_module = false; - if (isset($config['paginate_module']) === true) { - $paginate_module = (bool) $config['paginate_module']; - } - foreach ($network_interfaces as $interface_name => $interface) { if (empty($interface['traffic']) === false) { $permission = check_acl_one_of_groups($config['id_user'], $all_groups, 'RR'); diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 28a98e46b4..da51e102e0 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -1721,7 +1721,7 @@ function agents_get_modules( ); $limit = ''; - if ($pagination === true) { + if ($pagination === true && isset($config['paginate_module']) === true) { if ($offset === 0) { $limit = ' LIMIT '.$config['block_size'].' OFFSET 0'; } else {