mirror of
https://github.com/processwire/processwire.git
synced 2025-08-08 07:47:00 +02:00
Updated PaginatedArray::getTotal() method to return the count() quantity when no total has been set (previously it returned 0 if not set)
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
* #pw-body
|
* #pw-body
|
||||||
* #pw-summary-manipulation In most cases you will not need these manipulation methods as core API calls already take care of this.
|
* #pw-summary-manipulation In most cases you will not need these manipulation methods as core API calls already take care of this.
|
||||||
*
|
*
|
||||||
* ProcessWire 3.x, Copyright 2016 by Ryan Cramer
|
* ProcessWire 3.x, Copyright 2023 by Ryan Cramer
|
||||||
* https://processwire.com
|
* https://processwire.com
|
||||||
*
|
*
|
||||||
* @method string renderPager(array $options = array()) Renders pagination, when MarkupPageArray module installed
|
* @method string renderPager(array $options = array()) Renders pagination, when MarkupPageArray module installed
|
||||||
@@ -79,7 +79,9 @@ class PaginatedArray extends WireArray implements WirePaginatable {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function getTotal() {
|
public function getTotal() {
|
||||||
return $this->numTotal;
|
$total = $this->numTotal;
|
||||||
|
if(!$total) $total = $this->count();
|
||||||
|
return $total;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user