mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge branch '3.4' into 3.4.3
This commit is contained in:
commit
c794c29ddb
@ -293,6 +293,7 @@ class PaginatedList extends SS_ListDecorator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$left = max($current - $offset, 1);
|
$left = max($current - $offset, 1);
|
||||||
|
$right = min($current + $offset, $total);
|
||||||
$range = range($current - $offset, $current + $offset);
|
$range = range($current - $offset, $current + $offset);
|
||||||
|
|
||||||
if ($left + $context > $total) {
|
if ($left + $context > $total) {
|
||||||
@ -304,7 +305,7 @@ class PaginatedList extends SS_ListDecorator {
|
|||||||
$num = $i + 1;
|
$num = $i + 1;
|
||||||
|
|
||||||
$emptyRange = $num != 1 && $num != $total && (
|
$emptyRange = $num != 1 && $num != $total && (
|
||||||
$num == $left - 1 || $num == $left + $context + 1
|
$num == $left - 1 || $num == $right + 1
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($emptyRange) {
|
if ($emptyRange) {
|
||||||
|
Loading…
Reference in New Issue
Block a user