$condition = [
'contact-type' => Contact::TYPE_COMMUNITY,
- 'network' => [Protocol::DFRN, Protocol::ACTIVITYPUB],
- 'uid' => $uid,
- 'blocked' => false,
- 'pending' => false,
- 'archive' => false,
+ 'network' => [Protocol::DFRN, Protocol::ACTIVITYPUB],
+ 'uid' => $uid,
+ 'blocked' => false,
+ 'pending' => false,
+ 'archive' => false,
];
$condition = DBA::mergeConditions($condition, ["`platform` NOT IN (?, ?)", 'peertube', 'wordpress']);
$groupList = [];
- $fields = ['id', 'url', 'alias', 'name', 'micro', 'thumb', 'avatar', 'network', 'uid'];
+ $fields = ['id', 'url', 'alias', 'name', 'micro', 'thumb', 'avatar', 'network', 'uid'];
$contacts = DBA::select('account-user-view', $fields, $condition, $params);
if (!$contacts) {
return $groupList;
while ($contact = DBA::fetch($contacts)) {
$groupList[] = [
- 'url' => $contact['url'],
- 'alias' => $contact['alias'],
- 'name' => $contact['name'],
- 'id' => $contact['id'],
+ 'url' => $contact['url'],
+ 'alias' => $contact['alias'],
+ 'name' => $contact['name'],
+ 'id' => $contact['id'],
'micro' => $contact['micro'],
'thumb' => $contact['thumb'],
];
{
//sort by last updated item
$contacts = self::getList($uid, true, true, true);
- $total = count($contacts);
+ $total = count($contacts);
$visibleGroups = 10;
$id = 0;
return Renderer::replaceMacros(
$tpl,
[
- '$title' => DI::l10n()->t('Groups'),
- '$groups' => $entries,
- '$link_desc' => DI::l10n()->t('External link to group'),
+ '$title' => DI::l10n()->t('Groups'),
+ '$groups' => $entries,
+ '$link_desc' => DI::l10n()->t('External link to group'),
'$new_group_page' => 'register/',
- '$total' => $total,
+ '$total' => $total,
'$visible_groups' => $visibleGroups,
- '$showless' => DI::l10n()->t('show less'),
- '$showmore' => DI::l10n()->t('show more'),
+ '$showless' => DI::l10n()->t('show less'),
+ '$showmore' => DI::l10n()->t('show more'),
'$create_new_group' => DI::l10n()->t('Create new group')
],
);
AND NOT `contact`.`pending` AND NOT `contact`.`archive`
AND `contact`.`uid` = ?
GROUP BY `contact`.`id`",
- DI::userSession()->getLocalUserId(), Protocol::DFRN, Protocol::ACTIVITYPUB, Contact::TYPE_COMMUNITY, DI::userSession()->getLocalUserId()
+ DI::userSession()->getLocalUserId(),
+ Protocol::DFRN,
+ Protocol::ACTIVITYPUB,
+ Contact::TYPE_COMMUNITY,
+ DI::userSession()->getLocalUserId()
);
return DBA::toArray($stmtContacts);