Fix pagination in visual console list - #1994

This commit is contained in:
enriquecd 2018-03-01 15:50:34 +01:00
parent 3af4397f7f
commit 095a703c6c
1 changed files with 6 additions and 3 deletions

View File

@ -295,19 +295,22 @@ if ($own_info['is_admin'] || $vconsoles_read) {
$maps = visual_map_get_user_layouts (0,false,$filters,false); $maps = visual_map_get_user_layouts (0,false,$filters,false);
unset($filters['offset']); unset($filters['offset']);
unset($filters['limit']); unset($filters['limit']);
$total_maps = count($maps); $count_maps = visual_map_get_user_layouts (0,false,$filters,false);
$total_maps = count($count_maps);
}else{ }else{
$maps = visual_map_get_user_layouts (0,false,$filters, false); $maps = visual_map_get_user_layouts (0,false,$filters, false);
unset($filters['offset']); unset($filters['offset']);
unset($filters['limit']); unset($filters['limit']);
$total_maps = count($maps); $count_maps = visual_map_get_user_layouts (0,false,$filters,false);
$total_maps = count($count_maps);
} }
} }
else { else {
$maps = visual_map_get_user_layouts ($config['id_user'], false, $filters, false); $maps = visual_map_get_user_layouts ($config['id_user'], false, $filters, false);
unset($filters['offset']); unset($filters['offset']);
unset($filters['limit']); unset($filters['limit']);
$total_maps = count($maps); $count_maps = visual_map_get_user_layouts (0,false,$filters,false);
$total_maps = count($count_maps);
} }
if (!$maps && !is_metaconsole()) { if (!$maps && !is_metaconsole()) {
$total = count(visual_map_get_user_layouts ($config['id_user'], false, false, false)); $total = count(visual_map_get_user_layouts ($config['id_user'], false, false, false));