+ $res = $this->set->get($this->fields(),
+ $this->joins(),
+ $this->where(),
+ $this->groupBy(),
+ $this->order(),
+ $this->entriesPerPage,
+ $this->offset);
+ $order = Env::v('order', $this->defaultkey);
+ $end = end($res);
+ $show_bounds = 0;
+ if (($order == "name") || ($order == "-name")) {
+ $first = $res[0]['nom'];
+ $last = $end['nom'];
+ $show_bounds = 1;
+ } elseif (($order == "promo") || ($order == "-promo")) {
+ $first = $end['promo'];
+ $last = $res[0]['promo'];
+ $show_bounds = 1;
+ }
+ if (($show_bounds) && ($order{0} == '-')) {
+ $aux = $first;
+ $first = $last;
+ $last = $aux;
+ }
+
+ $page->assign('first', $first);
+ $page->assign('last', $last);
+ $page->assign('show_bounds', $show_bounds);
+ $page->assign('order', $order);