function publicStream($offset=0, $limit=20, $since_id=0, $before_id=0) {
- $needAnd = FALSE;
- $needWhere = TRUE;
-
+ $parts = array();
+
$qry = 'SELECT * FROM notice ';
if (common_config('public', 'localonly')) {
- $qry .= ' WHERE is_local = 1 ';
- $needWhere = FALSE;
- $needAnd = TRUE;
+ $parts[] = 'is_local = 1';
+ }
+
+ if (common_config('public', 'blacklist')) {
+ $parts[] = 'profile_id not in (' . implode(',', common_config('public', 'blacklist')) . ')';
}
+ if ($parts) {
+ $qry .= ' WHERE ' . implode(' AND ', $parts);
+ }
+
return Notice::getStream($qry,
'public',
$offset, $limit, $since_id, $before_id);
#optionally show non-local messages in public timeline
#$config['public']['localonly'] = false;
+#hide certain users from public pages, by ID
+#$config['public']['blacklist'][] = 123;
+#$config['public']['blacklist'][] = 2307;
+
#Do notice broadcasts offline
#If you use this, you must run the six offline daemons in the
#background. See the README for details.
'avatar' =>
array('server' => NULL),
'public' =>
- array('localonly' => true),
+ array('localonly' => true,
+ 'blacklist' => array()),
'theme' =>
array('server' => NULL),
'xmpp' =>