Add PlParallelIterator
[platal.git] / classes / plset.php
index b838fc9..b48fc92 100644 (file)
@@ -285,7 +285,7 @@ abstract class MultipageView implements PlView
 
     public function limit()
     {
-        return null;
+        return new PlLimit($this->entriesPerPage, $this->offset);
     }
 
     /** Name of the template to use for displaying items of the view
@@ -312,9 +312,9 @@ abstract class MultipageView implements PlView
         $res = $this->set->get($this->limit());
 
         $show_bounds = $this->bounds();
-        $start = current($res);
-        $end   = end($res);
         if ($show_bounds) {
+            $start = current($res);
+            $end   = end($res);
             if ($show_bounds == 1) {
                 $first = $this->getBoundValue($start);
                 $last  = $this->getBoundValue($end);