]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Revert "stream for direct responses"
authorEvan Prodromou <evan@status.net>
Wed, 9 Mar 2011 15:40:19 +0000 (10:40 -0500)
committerEvan Prodromou <evan@status.net>
Wed, 9 Mar 2011 15:40:19 +0000 (10:40 -0500)
I don't actually need this so I'm reverting it.

This reverts commit 04a3157681ed5375220c1030b7d5043413ecd65a.

classes/Notice.php

index d49a8f483b131abaa2ea8cf18fe65d069d777a78..d520f4728f60d98758041aae7fce74a923a497a0 100644 (file)
@@ -463,10 +463,6 @@ class Notice extends Memcached_DataObject
         // was not the root of the conversation.  What to do now?
 
         self::blow('notice:conversation_ids:%d', $this->conversation);
-        
-        if (!empty($this->reply_to)) {
-            self::blow('notice:responses:%d', $this->reply_to);
-        }
 
         if (!empty($this->repeat_of)) {
             self::blow('notice:repeats:%d', $this->repeat_of);
@@ -496,7 +492,6 @@ class Notice extends Memcached_DataObject
         $this->blowOnInsert();
 
         self::blow('profile:notice_ids:%d;last', $this->profile_id);
-        self::blow('notice:responses:%d', $this->id);
 
         if ($this->isPublic()) {
             self::blow('public;last');
@@ -2138,46 +2133,4 @@ class Notice extends Memcached_DataObject
                     ($this->is_local != Notice::GATEWAY));
         }
     }
-
-    function responseStream($offset=0, $limit=20, $since_id=0, $max_id=0)
-    {
-        $ids = Notice::stream(array($this, '_responseStreamDirect'),
-                              array(),
-                              'notice:responses:'.$id,
-                              $offset, $limit, $since_id, $max_id);
-
-        return Notice::getStreamByIds($ids);
-    }
-
-    function _responseStreamDirect($offset=0, $limit=20, $since_id=0, $max_id=0)
-    {
-        $notice = new Notice();
-
-        $notice->selectAdd(); // clears it
-        $notice->selectAdd('id');
-
-        $notice->reply_to = $this->reply_to;
-
-        $notice->orderBy('created DESC, id DESC');
-
-        if (!is_null($offset)) {
-            $notice->limit($offset, $limit);
-        }
-
-        Notice::addWhereSinceId($notice, $since_id);
-        Notice::addWhereMaxId($notice, $max_id);
-
-        $ids = array();
-
-        if ($notice->find()) {
-            while ($notice->fetch()) {
-                $ids[] = $notice->id;
-            }
-        }
-
-        $notice->free();
-        $notice = NULL;
-
-        return $ids;
-    }
 }