$gdirpath = Profile::zrl($this->config->get('system', 'directory'), true);
}
- if ((!$this->session->isAuthenticated() && $this->config->get('system', 'community_page_style') != Community::DISABLED_VISITOR) &&
- !($this->config->get('system', 'community_page_style') == Community::DISABLED)
- ) {
+ if (($this->session->getLocalUserId() || $this->config->get('system', 'community_page_style') != Community::DISABLED_VISITOR) &&
+ !($this->config->get('system', 'community_page_style') == Community::DISABLED)) {
$nav['community'] = ['community', $this->l10n->t('Community'), '', $this->l10n->t('Conversations on this and other servers')];
}
if ($this->session->getLocalUserId()) {
- $nav['channel'] = ['channel', $this->l10n->t('Channels'), '', $this->l10n->t('Current posts, filtered by several rules')];
$nav['calendar'] = ['calendar', $this->l10n->t('Calendar'), '', $this->l10n->t('Calendar')];
}
$this->parseRequest($request);
- $t = Renderer::getMarkupTemplate("community.tpl");
+ $t = Renderer::getMarkupTemplate('community.tpl');
$o = Renderer::replaceMacros($t, [
'$content' => '',
'$header' => '',
$o .= Renderer::replaceMacros($tpl, ['$reload_uri' => $this->args->getQueryString()]);
}
- if (empty($request['mode']) || ($request['mode'] != 'raw')) {
- $tabs = $this->getTabArray($this->timeline->getChannelsForUser($this->session->getLocalUserId()), 'channel');
- $tabs = array_merge($tabs, $this->getTabArray($this->timeline->getCommunities(true), 'channel'));
+ if (!$this->raw) {
+ $tabs = $this->getTabArray($this->channel->getTimelines($this->session->getLocalUserId()), 'channel');
+ $tabs = array_merge($tabs, $this->getTabArray($this->channelRepository->selectByUid($this->session->getLocalUserId()), 'channel'));
+ $tabs = array_merge($tabs, $this->getTabArray($this->community->getTimelines(true), 'channel'));
$tab_tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
$o .= Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs]);
// We always strip the title since it will be added in the page information
$item['title'] = '';
$item['body'] = $item['body'] . "\n" . PageInfo::getFooterFromData($data, false);
- $taglist = $contact['fetch_further_information'] == 2 ? PageInfo::getTagsFromUrl($item['plink'], $preview, $contact['ffi_keyword_blacklist'] ?? '') : [];
+ $taglist = $fetch_further_information == LocalRelationship::FFI_BOTH ? PageInfo::getTagsFromUrl($item['plink'], $preview, $contact['ffi_keyword_denylist'] ?? '') : [];
$item['object-type'] = Activity\ObjectType::BOOKMARK;
$attachments = [];
DBA::close($users);
// Update contact relations for our users
- $users = DBA::select('user', ['uid'], ["NOT `account_expired` AND NOT `account_removed` AND `uid` > ?", 0]);
+ $users = DBA::select('user', ['uid'], ["`verified` AND NOT `blocked` AND NOT `account_removed` AND NOT `account_expired` AND `uid` > ?", 0]);
while ($user = DBA::fetch($users)) {
Worker::add(Worker::PRIORITY_LOW, 'ContactDiscoveryForUser', $user['uid']);
}