Pass startnumber/limit parameters
authorChuck Hagenbuch <chuck@horde.org>
Tue, 2 Nov 2010 11:39:00 +0000 (07:39 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Tue, 2 Nov 2010 11:39:00 +0000 (07:39 -0400)
jonah/lib/Driver.php
jonah/lib/Driver/Sql.php

index 491af6a..086c5be 100644 (file)
@@ -292,7 +292,9 @@ class Jonah_Driver
         if ($max !== null) {
             $stories = $this->getStories(
                     array('channel_id' => $channel_id,
-                          'published' => true),
+                          'published' => true,
+                          'startnumber' => $from,
+                          'limit' => $max),
                     $order);
         } else {
             $stories = $this->getStories(array('channel_id' => $channel_id,
index 274d6db..c71f77c 100644 (file)
@@ -455,7 +455,7 @@ class Jonah_Driver_Sql extends Jonah_Driver
         Horde::logMessage('SQL Query by Jonah_Driver_sql::_getStories(): ' . $sql, 'DEBUG');
         if ($limit || $start != 0) {
             $results = array();
-            $rows = $this->_db->limitQuery($sql, $start, $limit, $values    );
+            $rows = $this->_db->limitQuery($sql, $start, $limit, $values);
             while ($rows->fetchInto($row, DB_FETCHMODE_ASSOC)) {
                 $results[] = $row;
             }