X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FApps.php;h=07863e44c5aeb9f9c8ef715f9039bbf4e6670e52;hb=41030f596bc9aa0859dbdf07bc65f8695eb4a249;hp=29a735121d2b57dadd169288749f0b99c1a69ce5;hpb=0007da8630feed2f3207b95d226309a5f03ded43;p=friendica.git diff --git a/src/Module/Apps.php b/src/Module/Apps.php index 29a735121d..07863e44c5 100644 --- a/src/Module/Apps.php +++ b/src/Module/Apps.php @@ -1,6 +1,6 @@ get('config', 'private_addons'); - if ($privateaddons === "1" && !local_user()) { - DI::baseUrl()->redirect(); + parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + + $this->nav = $nav; + $this->systemMessages = $systemMessages; + + $privateaddons = $config->get('config', 'private_addons'); + if ($privateaddons === "1" && !$session->getLocalUserId()) { + $baseUrl->redirect(); } } - public static function content(array $parameters = []) + protected function content(array $request = []): string { - $apps = Nav::getAppMenu(); - + $apps = $this->nav->getAppMenu(); if (count($apps) == 0) { - notice(DI::l10n()->t('No installed applications.')); + $this->systemMessages->addNotice($this->t('No installed applications.')); } $tpl = Renderer::getMarkupTemplate('apps.tpl'); return Renderer::replaceMacros($tpl, [ - '$title' => DI::l10n()->t('Applications'), + '$title' => $this->t('Applications'), '$apps' => $apps, ]); }