diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/Notice.php | 6 | ||||
-rw-r--r-- | classes/User.php | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/classes/Notice.php b/classes/Notice.php index 76d6d801e..cbd952767 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -220,12 +220,12 @@ class Notice extends Memcached_DataObject static function getStreamDirect($qry, $offset, $limit) { - $qry .= 'ORDER BY notice.created DESC, notice.id DESC '; + $qry .= ' ORDER BY notice.created DESC, notice.id DESC '; if(common_config('db','type')=='pgsql') { - $qry .= 'LIMIT ' . $limit . ' OFFSET ' . $offset; + $qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset; } else { - $qry .= 'LIMIT ' . $offset . ', ' . $limit; + $qry .= ' LIMIT ' . $offset . ', ' . $limit; } $notice = new Notice(); diff --git a/classes/User.php b/classes/User.php index 4ff886957..4242d0109 100644 --- a/classes/User.php +++ b/classes/User.php @@ -344,7 +344,7 @@ class User extends Memcached_DataObject $qry = 'SELECT notice.* ' . 'FROM notice JOIN fave ON notice.id = fave.notice_id ' . - 'WHERE fave.profile_id = %d '; + 'WHERE fave.user_id = %d '; return Notice::getStream(sprintf($qry, $this->id), 'user:faves:'.$this->id, @@ -355,7 +355,7 @@ class User extends Memcached_DataObject $qry = 'SELECT notice.* ' . 'FROM notice JOIN subscription ON notice.profile_id = subscription.subscribed ' . - 'WHERE subscription.subscriber = %d'; + 'WHERE subscription.subscriber = %d '; return Notice::getStream(sprintf($qry, $this->id), 'user:notices_with_friends:' . $this->id, |