mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
fixed pagination (final page)
This commit is contained in:
parent
017333c46a
commit
da7f286b22
@ -323,11 +323,19 @@ class Group extends Entity
|
||||
}
|
||||
}
|
||||
|
||||
if ($step > 2) {
|
||||
$processed = (($step - 2) * $limit);
|
||||
} else {
|
||||
$processed = 0;
|
||||
}
|
||||
|
||||
$current_ammount = (count($return) + $processed);
|
||||
|
||||
echo json_encode(
|
||||
[
|
||||
'results' => $return,
|
||||
'pagination' => [
|
||||
'more' => (count($return) + (($step - 2) * $limit)) < $count,
|
||||
'more' => $current_ammount < $count,
|
||||
],
|
||||
]
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user