]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/favenoticestream.php
updated and moved jquery-cookie
[quix0rs-gnu-social.git] / lib / favenoticestream.php
index 987805cf9d970246f9cd8192474f811fb28ac44d..6527e5441e37cc8dd5c11acb9bd1e6f93b1c8c4c 100644 (file)
@@ -44,10 +44,9 @@ if (!defined('STATUSNET')) {
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
  * @link      http://status.net/
  */
-
 class FaveNoticeStream extends ScopingNoticeStream
 {
-    function __construct($user_id, $own)
+    function __construct($user_id, $own, $profile = -1)
     {
         $stream = new RawFaveNoticeStream($user_id, $own);
         if ($own) {
@@ -55,7 +54,11 @@ class FaveNoticeStream extends ScopingNoticeStream
         } else {
             $key = 'fave:ids_by_user:'.$user_id;
         }
-        parent::__construct(new CachingNoticeStream($stream, $key));
+        if (is_int($profile) && $profile == -1) {
+            $profile = Profile::current();
+        }
+        parent::__construct(new CachingNoticeStream($stream, $key),
+                            $profile);
     }
 }
 
@@ -69,7 +72,6 @@ class FaveNoticeStream extends ScopingNoticeStream
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
  * @link      http://status.net/
  */
-
 class RawFaveNoticeStream extends NoticeStream
 {
     protected $user_id;