commit 2e37fbc2d4017c1bea4e8c746fad57a26da4c064
parent c29e7075ef465bfaa994181b4cbf9efce10aad9c
Author: markseu <mark2011@mayberg.se>
Date: Thu, 13 Jan 2022 19:48:40 +0100
Updated extensions, moved pagination into layouts
Diffstat:
4 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/system/extensions/core.php b/system/extensions/core.php
@@ -2,7 +2,7 @@
// Core extension, https://github.com/datenstrom/yellow-extensions/tree/master/source/core
class YellowCore {
- const VERSION = "0.8.57";
+ const VERSION = "0.8.58";
const RELEASE = "0.8.18";
public $page; // current page
public $content; // content files
@@ -1127,14 +1127,18 @@ class YellowPageCollection extends ArrayObject {
// Paginate page collection
public function paginate($limit) {
- $this->paginationNumber = 1;
- $this->paginationCount = ceil($this->count() / $limit);
- if ($this->yellow->page->isRequest("page")) $this->paginationNumber = intval($this->yellow->page->getRequest("page"));
- if ($this->paginationNumber<0 || $this->paginationNumber>$this->paginationCount) $this->paginationNumber = 0;
- if ($this->paginationNumber) {
- $this->exchangeArray(array_slice($this->getArrayCopy(), ($this->paginationNumber - 1) * $limit, $limit));
- } else {
- $this->yellow->page->error(404);
+ if (!$this->isPagination() && $limit!=0) {
+ $this->paginationNumber = 1;
+ $this->paginationCount = ceil($this->count() / $limit);
+ if ($this->yellow->page->isRequest("page")) {
+ $this->paginationNumber = intval($this->yellow->page->getRequest("page"));
+ }
+ if ($this->paginationNumber<0 || $this->paginationNumber>$this->paginationCount) $this->paginationNumber = 0;
+ if ($this->paginationNumber) {
+ $this->exchangeArray(array_slice($this->getArrayCopy(), ($this->paginationNumber - 1) * $limit, $limit));
+ } else {
+ $this->yellow->page->error(404);
+ }
}
return $this;
}
diff --git a/system/extensions/install-blog.bin b/system/extensions/install-blog.bin
Binary files differ.
diff --git a/system/extensions/install-wiki.bin b/system/extensions/install-wiki.bin
Binary files differ.
diff --git a/system/extensions/update-current.ini b/system/extensions/update-current.ini
@@ -21,11 +21,11 @@ Tag: feature
system/extensions/command.php: command.php, create, update
Extension: Core
-Version: 0.8.57
+Version: 0.8.58
Description: Core functionality of the website.
HelpUrl: https://github.com/datenstrom/yellow-extensions/tree/master/source/core
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/master/zip/core.zip
-Published: 2022-01-11 21:11:22
+Published: 2022-01-13 19:40:30
Developer: Datenstrom
Tag: feature
system/extensions/core.php: core.php, create, update