From 701c0b6f4dd6c32acb0508e6d59dce034bdc6a4f Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Mon, 1 Mar 2010 16:03:52 +0100 Subject: [PATCH] Fixes bounds display on multipage view. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- classes/plset.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/classes/plset.php b/classes/plset.php index d0a7f8e..b838fc9 100644 --- a/classes/plset.php +++ b/classes/plset.php @@ -312,14 +312,15 @@ abstract class MultipageView implements PlView $res = $this->set->get($this->limit()); $show_bounds = $this->bounds(); - $end = end($res); + $start = current($res); + $end = end($res); if ($show_bounds) { if ($show_bounds == 1) { - $first = $this->getBoundValue($res[0]); + $first = $this->getBoundValue($start); $last = $this->getBoundValue($end); } elseif ($show_bounds == -1) { $first = $this->getBoundValue($end); - $last = $this->getBoundValue($res[0]); + $last = $this->getBoundValue($start); } $page->assign('first', $first); $page->assign('last', $last); -- 2.1.4