}
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, '$more' => $this->l10n->t('More')]);
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']);
}