]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/ActivitySpam/lib/spamnoticestream.php
UserFlag: Pass proper profile to FlaggedProfileListItem
[quix0rs-gnu-social.git] / plugins / ActivitySpam / lib / spamnoticestream.php
index ffb8d080251d5e22e7949c328fbf09de5da816d3..d19814509c134be3706555391eaf92a0c0e8b8dc 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); }
 
 /**
  * Spam notice stream
@@ -47,13 +43,10 @@ if (!defined('STATUSNET')) {
 
 class SpamNoticeStream extends ScopingNoticeStream
 {
-    function __construct($tag, $profile = -1)
+    function __construct(Profile $scoped=null)
     {
-        if (is_int($profile) && $profile == -1) {
-            $profile = Profile::current();
-        }
-        parent::__construct(new CachingNoticeStream(new RawSpamNoticeStream(),
-                                                    'spam_score:notice_ids'));
+        parent::__construct(new CachingNoticeStream(new RawSpamNoticeStream(), 'spam_score:notice_ids'),
+                            $scoped);
     }
 }