From: Stéphane Jacob Date: Tue, 27 Sep 2011 22:22:54 +0000 (+0200) Subject: Retrieves total count for pl_set, before applying restrictions. X-Git-Tag: core/1.1.6~4 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=da2b7816d79220f3659805ec0094e8ffcd4c9702;p=platal.git Retrieves total count for pl_set, before applying restrictions. Signed-off-by: Stéphane Jacob --- 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;