From bc368fefac327f9d9197bd4b89d372b85afc3bd6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 7 Jan 2024 07:40:51 +0100 Subject: [PATCH] Continued: - restored (maybe due to bad rebasing) - replaced double-quotes with single --- src/Content/Nav.php | 1 - src/Module/Conversation/Channel.php | 9 +++++---- src/Worker/Cron.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Content/Nav.php b/src/Content/Nav.php index 4bf6767a30..695d32ffdd 100644 --- a/src/Content/Nav.php +++ b/src/Content/Nav.php @@ -286,7 +286,6 @@ class Nav } 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')]; } diff --git a/src/Module/Conversation/Channel.php b/src/Module/Conversation/Channel.php index e07f1c33cf..3187346c4f 100644 --- a/src/Module/Conversation/Channel.php +++ b/src/Module/Conversation/Channel.php @@ -78,7 +78,7 @@ class Channel extends Timeline $this->parseRequest($request); - $t = Renderer::getMarkupTemplate("community.tpl"); + $t = Renderer::getMarkupTemplate('community.tpl'); $o = Renderer::replaceMacros($t, [ '$content' => '', '$header' => '', @@ -89,9 +89,10 @@ class Channel extends Timeline $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')]); diff --git a/src/Worker/Cron.php b/src/Worker/Cron.php index 0702fd0f6f..cf0529c8b4 100644 --- a/src/Worker/Cron.php +++ b/src/Worker/Cron.php @@ -135,7 +135,7 @@ class Cron 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']); } -- 2.39.5