diff --git a/src/Module/Conversation/Community.php b/src/Module/Conversation/Community.php index 8134c070e..646b26907 100644 --- a/src/Module/Conversation/Community.php +++ b/src/Module/Conversation/Community.php @@ -53,11 +53,19 @@ class Community extends BaseModule { $this->parseRequest(); + $t = Renderer::getMarkupTemplate("community.tpl"); + $o = Renderer::replaceMacros($t, [ + '$content' => '', + '$header' => '', + '$show_global_community_hint' => (self::$content == 'global') && DI::config()->get('system', 'show_global_community_hint'), + '$global_community_hint' => DI::l10n()->t("This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.") + ]); + if (DI::pConfig()->get(local_user(), 'system', 'infinite_scroll')) { $tpl = Renderer::getMarkupTemplate('infinite_scroll_head.tpl'); - $o = Renderer::replaceMacros($tpl, ['$reload_uri' => DI::args()->getQueryString()]); + $o .= Renderer::replaceMacros($tpl, ['$reload_uri' => DI::args()->getQueryString()]); } else { - $o = ''; + $o .= ''; } if (empty($_GET['mode']) || ($_GET['mode'] != 'raw')) { @@ -154,13 +162,7 @@ class Community extends BaseModule $o .= $pager->renderMinimal(count($items)); } - $t = Renderer::getMarkupTemplate("community.tpl"); - return Renderer::replaceMacros($t, [ - '$content' => $o, - '$header' => '', - '$show_global_community_hint' => (self::$content == 'global') && DI::config()->get('system', 'show_global_community_hint'), - '$global_community_hint' => DI::l10n()->t("This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.") - ]); + return $o; } /**