Fixed error in pagination to extension Agents/Modules

(cherry picked from commit 46e74f1ddd)
This commit is contained in:
m-lopez-f 2015-04-22 09:41:42 +02:00
parent 4e6184f46b
commit 796e7b1f33
1 changed files with 3 additions and 4 deletions

View File

@ -138,7 +138,7 @@ function mainAgentsModules() {
} }
$count++; $count++;
} }
$total_pagination = count($agents);
$all_modules = agents_get_modules($agents, false, $filter_module_group, true, false); $all_modules = agents_get_modules($agents, false, $filter_module_group, true, false);
$modules_by_name = array(); $modules_by_name = array();
@ -242,13 +242,12 @@ function mainAgentsModules() {
echo "</tr>"; echo "</tr>";
$filter_agents = array('offset' => (int) $offset, $filter_agents = array('offset' => (int) $offset, 'disabled' => 0);
'limit' => (int) $config['block_size'], 'disabled' => 0);
if ($group_id > 0) { if ($group_id > 0) {
$filter_agents['id_grupo'] = $group_id; $filter_agents['id_grupo'] = $group_id;
} }
// Prepare pagination // Prepare pagination
ui_pagination ((int)count(agents_get_agents ($filter_agents))); ui_pagination ($total_pagination);
foreach ($agents as $agent) { foreach ($agents as $agent) {
// Get stats for this group // Get stats for this group