100) { $ret = Activity::paged_collection_init($t[0]['total'], App::$query_string); } else { $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(App::$pager['itemspage']), intval(App::$pager['start'])); $r = q( "select * from xchan left join abconfig on abconfig.xchan = xchan_hash left join abook on abook_xchan = xchan_hash where abook_channel = %d and abconfig.chan = %d and abconfig.cat = 'system' and abconfig.k = 'my_perms' and abconfig.v like '%%send_stream%%' and xchan_hash != '%s' and xchan_orphan = 0 and xchan_deleted = 0 and abook_hidden = 0 and abook_pending = 0 and abook_self = 0 $sqlExtra $pager_sql", intval($channel['channel_id']), intval($channel['channel_id']), dbesc($channel['channel_hash']) ); $this->results = $r; $ret = Activity::encode_follow_collection($r, App::$query_string, 'OrderedCollection', $t[0]['total']); } if (ActivityStreams::is_as_request()) { as_return_and_die($ret, $channel); } } function get() { if ($this->results) { foreach ($this->results as $member) { $members[] = micropro($member, true, 'mpgroup', 'card'); } } $o = replace_macros(Theme::get_template('listmembers.tpl'), [ '$title' => t('List members'), '$members' => $members ]); return $o; } }