diff options
author | Evan Prodromou <evan@status.net> | 2010-01-13 00:44:29 -0800 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-01-13 00:44:29 -0800 |
commit | 1bbd19169f22b9405b4ee1964da7e94a228a8dd5 (patch) | |
tree | 8d6ab175c14cb1bafe76f59c1c1d0797d1560c49 /classes | |
parent | b25e59a11fb5eb6ea97d8b9c6081d1e1585febb3 (diff) |
unimplement repeatedToMe() until we figure out how
Diffstat (limited to 'classes')
-rw-r--r-- | classes/User.php | 51 |
1 files changed, 1 insertions, 50 deletions
diff --git a/classes/User.php b/classes/User.php index bde3f71b9..d6b52be01 100644 --- a/classes/User.php +++ b/classes/User.php @@ -899,56 +899,7 @@ class User extends Memcached_DataObject function repeatedToMe($offset=0, $limit=20, $since_id=null, $max_id=null) { - $ids = Notice::stream(array($this, '_repeatedToMeDirect'), - array(), - 'user:repeated_to_me:'.$this->id, - $offset, $limit, $since_id, $max_id, null); - - return Notice::getStreamByIds($ids); - } - - function _repeatedToMeDirect($offset, $limit, $since_id, $max_id, $since) - { - $qry = - 'SELECT notice.id AS id ' . - 'FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id ' . - 'WHERE notice_inbox.user_id = ' . $this->id . ' ' . - 'AND notice.repeat_of IS NOT NULL '; - - if ($since_id != 0) { - $qry .= 'AND notice.id > ' . $since_id . ' '; - } - - if ($max_id != 0) { - $qry .= 'AND notice.id <= ' . $max_id . ' '; - } - - if (!is_null($since)) { - $qry .= 'AND notice.modified > \'' . date('Y-m-d H:i:s', $since) . '\' '; - } - - // NOTE: we sort by fave time, not by notice time! - - $qry .= 'ORDER BY notice.id DESC '; - - if (!is_null($offset)) { - $qry .= "LIMIT $limit OFFSET $offset"; - } - - $ids = array(); - - $notice = new Notice(); - - $notice->query($qry); - - while ($notice->fetch()) { - $ids[] = $notice->id; - } - - $notice->free(); - $notice = NULL; - - return $ids; + throw new Exception("Not implemented since inbox change."); } function shareLocation() |