From 7f86f8eb6fb7ae2b764ff4e56d94883e54847dd8 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Mon, 11 Mar 2019 14:35:44 +0200 Subject: [PATCH] Bug fixes --- system/src/Grav/Framework/Flex/Flex.php | 2 +- system/src/Grav/Framework/Pagination/AbstractPagination.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system/src/Grav/Framework/Flex/Flex.php b/system/src/Grav/Framework/Flex/Flex.php index afb6e81d2..c8278e9af 100644 --- a/system/src/Grav/Framework/Flex/Flex.php +++ b/system/src/Grav/Framework/Flex/Flex.php @@ -171,7 +171,7 @@ class Flex implements \Countable // Normalize key and type using fallback to default type if it was set. [$key, $type, $guess] = $this->resolveKeyAndType($flexKey, $defaultType); - if ($type === '') { + if ($type === '' && $types) { // Add keys which are not associated to any Flex type. They will be included to every Flex type. foreach ($types as $type => &$array) { $array[] = $key; diff --git a/system/src/Grav/Framework/Pagination/AbstractPagination.php b/system/src/Grav/Framework/Pagination/AbstractPagination.php index 900316c6d..54a2f60d3 100644 --- a/system/src/Grav/Framework/Pagination/AbstractPagination.php +++ b/system/src/Grav/Framework/Pagination/AbstractPagination.php @@ -48,7 +48,7 @@ class AbstractPagination implements PaginationInterface protected $defaultOptions = [ 'type' => 'page', 'limit' => 10, - 'display' => 3, + 'display' => 5, 'opening' => 0, 'ending' => 0, 'url' => null @@ -186,8 +186,8 @@ class AbstractPagination implements PaginationInterface // Make list like: 1 ... 4 5 6 ... 10 $range = range($this->pagesStart, $this->pagesStop); - $range[] = 1; - $range[] = $this->pages; + //$range[] = 1; + //$range[] = $this->pages; natsort($range); $range = array_unique($range);