]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/conversationnoticestream.php
Merge remote-tracking branch 'upstream/nightly' into nightly
[quix0rs-gnu-social.git] / lib / conversationnoticestream.php
index b9b03c45c5b6354b262a8a6ba02967c95dcea7a8..bcb16c2d4b5a87a05773dcac134afe2b652d39a0 100644 (file)
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET')) {
-    // This check helps protect against security problems;
-    // your code file can't be executed directly from the web.
-    exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 /**
  * Notice stream for a conversation
@@ -46,14 +42,10 @@ if (!defined('STATUSNET')) {
  */
 class ConversationNoticeStream extends ScopingNoticeStream
 {
-    function __construct($id, $profile = -1)
+    function __construct($id, Profile $scoped=null)
     {
-        if (is_int($profile) && $profile == -1) {
-            $profile = Profile::current();
-        }
-
         parent::__construct(new RawConversationNoticeStream($id),
-                            $profile);
+                            $scoped);
     }
 }
 
@@ -73,6 +65,7 @@ class RawConversationNoticeStream extends NoticeStream
 
     function __construct($id)
     {
+        parent::__construct();
         $this->id = $id;
     }
 
@@ -95,6 +88,8 @@ class RawConversationNoticeStream extends NoticeStream
             $notice->limit($offset, $limit);
         }
 
+        self::filterVerbs($notice, $this->selectVerbs);
+
         // ORDER BY
         // currently imitates the previously used "_reverseChron" sorting
         $notice->orderBy('notice.created DESC');