From da2b7816d79220f3659805ec0094e8ffcd4c9702 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Wed, 28 Sep 2011 00:22:54 +0200 Subject: [PATCH] Retrieves total count for pl_set, before applying restrictions. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- classes/plset.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes/plset.php b/classes/plset.php index 17ca249..4d28f86 100644 --- a/classes/plset.php +++ b/classes/plset.php @@ -31,6 +31,7 @@ abstract class PlSet protected $limit = null; protected $count = null; + protected $total_count = null; protected $groups = false; // Handle the "restrict to values of the current order" @@ -158,6 +159,7 @@ abstract class PlSet } $pf_res = $this->buildFilterHelper($orders); $pf_groups = $pf_res; + $this->total_count = $pf_res->getTotalCount(); if ($this->restrict_to != null && count($this->orders) && $this->orders[0] instanceof PlFilterGroupableOrder) @@ -275,6 +277,7 @@ abstract class PlSet } $page->assign('plset_content', $view->apply($page)); $page->assign('plset_count', $this->count); + $page->assign('plset_total_count', $this->total_count); $page->assign('plset_has_groups', $this->groups != null); $page->assign('plset_groups', $this->groups); return true; -- 2.1.4