actually *use* the sql limit clause
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 21 Dec 2010 21:08:47 +0000 (16:08 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 21 Dec 2010 21:09:53 +0000 (16:09 -0500)
content/lib/Tagger.php

index 1f6c5f4..58d7c3e 100644 (file)
@@ -526,7 +526,8 @@ class Content_Tagger
         $sql .= ' GROUP BY objects.object_name HAVING num_common_tags >= ' . $threshold
             . ' ORDER BY num_common_tags DESC';
 
-        $this->_db->addLimitOffset($sql, array('limit' => $max_objects));
+        $sql = $this->_db->addLimitOffset($sql, array('limit' => $max_objects));
+
         try {
             return $this->_db->selectAssoc($sql);
         } catch (Horde_Db_Exception $e) {