From: Stéphane Jacob Date: Mon, 1 Mar 2010 15:03:52 +0000 (+0100) Subject: Fixes bounds display on multipage view. X-Git-Tag: core/1.1.0~67 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=701c0b6f4dd6c32acb0508e6d59dce034bdc6a4f;p=platal.git Fixes bounds display on multipage view. Signed-off-by: Stéphane Jacob --- 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);