X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fpublicnoticestream.php;h=757c2164c08fc69af8e00bb9a24418d4b13899ec;hb=0590f2975e6c5b26bbe6121da5c49890e035721e;hp=5c8d313d46591dd3650d80a6bd78352a9aceca48;hpb=e862dcdb8a9cfc21cf00513d76f40d20dd3b1b7a;p=quix0rs-gnu-social.git diff --git a/lib/publicnoticestream.php b/lib/publicnoticestream.php index 5c8d313d46..757c2164c0 100644 --- a/lib/publicnoticestream.php +++ b/lib/publicnoticestream.php @@ -47,10 +47,11 @@ if (!defined('STATUSNET')) { class PublicNoticeStream extends ScopingNoticeStream { - function __construct() + function __construct($profile=null) { parent::__construct(new CachingNoticeStream(new RawPublicNoticeStream(), - 'public')); + 'public'), + $profile); } } @@ -80,17 +81,16 @@ class RawPublicNoticeStream extends NoticeStream $notice->limit($offset, $limit); } - if (common_config('public', 'localonly')) { - $notice->whereAdd('is_local = ' . Notice::LOCAL_PUBLIC); - } else { - // -1 == blacklisted, -2 == gateway (i.e. Twitter) - $notice->whereAdd('is_local !='. Notice::LOCAL_NONPUBLIC); - $notice->whereAdd('is_local !='. Notice::GATEWAY); - } + // This feed always gives only local activities. + $notice->whereAdd('is_local = ' . Notice::LOCAL_PUBLIC); Notice::addWhereSinceId($notice, $since_id); Notice::addWhereMaxId($notice, $max_id); + if (!empty($this->selectVerbs)) { + $notice->whereAddIn('verb', $this->selectVerbs, $notice->columnType('verb')); + } + $ids = array(); if ($notice->find()) { @@ -104,4 +104,4 @@ class RawPublicNoticeStream extends NoticeStream return $ids; } -} \ No newline at end of file +}