mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 14:35:16 +00:00
Merge branch 'dev' of /home/macgirvin/z into dev
This commit is contained in:
commit
713e92d70e
2 changed files with 37 additions and 10 deletions
|
@ -13,7 +13,8 @@ use Zotlabs\Lib\Libprofile;
|
|||
class Followers extends Controller
|
||||
{
|
||||
|
||||
|
||||
private $results = [];
|
||||
|
||||
public function init()
|
||||
{
|
||||
|
||||
|
@ -30,10 +31,6 @@ class Followers extends Controller
|
|||
http_status_exit(404, 'Not found');
|
||||
}
|
||||
|
||||
// if (intval($channel['channel_system'])) {
|
||||
// http_status_exit(403,'Permission denied');
|
||||
// }
|
||||
|
||||
Libprofile::load(argv(1));
|
||||
|
||||
$observer_hash = get_observer_hash();
|
||||
|
@ -69,11 +66,26 @@ class Followers extends Controller
|
|||
dbesc($channel['channel_hash'])
|
||||
);
|
||||
|
||||
$ret = Activity::encode_follow_collection($r, App::$query_string, 'OrderedCollection', $t[0]['total']);
|
||||
$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(get_markup_template('listmembers.tpl'), [
|
||||
'$title' => t('List members'),
|
||||
'$members' => $members
|
||||
]);
|
||||
return $o;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,8 @@ use Zotlabs\Lib\Libprofile;
|
|||
class Following extends Controller
|
||||
{
|
||||
|
||||
private $results = [];
|
||||
|
||||
public function init()
|
||||
{
|
||||
|
||||
|
@ -29,10 +31,6 @@ class Following extends Controller
|
|||
http_status_exit(404, 'Not found');
|
||||
}
|
||||
|
||||
// if (intval($channel['channel_system'])) {
|
||||
// http_status_exit(403,'Permission denied');
|
||||
// }
|
||||
|
||||
Libprofile::load(argv(1));
|
||||
|
||||
$observer_hash = get_observer_hash();
|
||||
|
@ -69,6 +67,8 @@ class Following extends Controller
|
|||
dbesc($channel['channel_hash'])
|
||||
);
|
||||
|
||||
$this->results = $r;
|
||||
|
||||
$ret = Activity::encode_follow_collection($r, App::$query_string, 'OrderedCollection', $t[0]['total']);
|
||||
}
|
||||
|
||||
|
@ -76,4 +76,19 @@ class Following extends Controller
|
|||
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(get_markup_template('listmembers.tpl'), [
|
||||
'$title' => t('List members'),
|
||||
'$members' => $members
|
||||
]);
|
||||
return $o;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue