Issue 11919: Avoid possible memory problems

This commit is contained in:
Michael 2022-09-25 06:34:13 +00:00
parent 81f7feabc6
commit 662c846402

View file

@ -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 nodes 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 nodes users.")
]);
return $o;
}
/**