From f35e7d52ed2790c856da9ca99407611d4afc74f2 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 15 Dec 2023 11:34:27 +0100 Subject: [PATCH] #12643 fix pagination --- pandora_console/operation/events/events.php | 23 +++++++-------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 6d969481a3..38e57d203a 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -1240,6 +1240,7 @@ if (is_ajax() === true) { } } + $no_return = false; if (empty($tmp) === false && $regex !== '') { $regex_validation = false; foreach (json_decode(json_encode($tmp), true) as $key => $field) { @@ -1249,28 +1250,20 @@ if (is_ajax() === true) { } if ($regex_validation === false) { - unset($tmp); + $no_return = true; } } - $carry[] = $tmp; - return $carry; + if ($no_return === false) { + $carry[] = $tmp; + return $carry; + } else { + return; + } } ); } - if (isset($data) === true) { - $data = array_values( - array_filter( - $data, - function ($item) { - return (bool) (array) $item; - } - ) - ); - $count = count($data); - } - // RecordsTotal && recordsfiltered resultados totales. echo json_encode( [