]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Fave.php
Merge branch '0.8.x' of git@gitorious.org:statusnet/mainline into 0.8.x
[quix0rs-gnu-social.git] / classes / Fave.php
index f4cf6256ff314af7aca2b5b7867c5dca011b8177..11e876ff19dcc1294aae6ddb8dfda6e7486eda11 100644 (file)
@@ -42,7 +42,7 @@ class Fave extends Memcached_DataObject
         $ids = Notice::stream(array('Fave', '_streamDirect'),
                               array($user_id, $own),
                               ($own) ? 'fave:ids_by_user_own:'.$user_id :
-                              'fave:by_user:'.$user_id,
+                              'fave:ids_by_user:'.$user_id,
                               $offset, $limit);
         return $ids;
     }
@@ -59,7 +59,7 @@ class Fave extends Memcached_DataObject
              $qry =  'SELECT fave.* FROM fave ';
              $qry .= 'INNER JOIN notice ON fave.notice_id = notice.id ';
              $qry .= 'WHERE fave.user_id = ' . $user_id . ' ';
-             $qry .= 'AND notice.is_local != ' . NOTICE_GATEWAY . ' ';
+             $qry .= 'AND notice.is_local != ' . Notice::GATEWAY . ' ';
         }
 
         if ($since_id != 0) {
@@ -79,7 +79,7 @@ class Fave extends Memcached_DataObject
         $qry .= 'ORDER BY modified DESC ';
 
         if (!is_null($offset)) {
-            $qry .= "LIMIT $offset, $limit";
+            $qry .= "LIMIT $limit OFFSET $offset";
         }
 
         $fav->query($qry);