X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FModule%2FApps.php;h=07863e44c5aeb9f9c8ef715f9039bbf4e6670e52;hb=649bbaa4c3d28cdf4cb8544ff2f92ba493023953;hp=ea31140df63508fcd54dbecaa86ab42f931b9d23;hpb=ce578a77453fd421e9598c994ef008ad7e128de6;p=friendica.git diff --git a/src/Module/Apps.php b/src/Module/Apps.php index ea31140df6..07863e44c5 100644 --- a/src/Module/Apps.php +++ b/src/Module/Apps.php @@ -1,6 +1,6 @@ nav = $nav; + $this->systemMessages = $systemMessages; $privateaddons = $config->get('config', 'private_addons'); - if ($privateaddons === "1" && !local_user()) { + if ($privateaddons === "1" && !$session->getLocalUserId()) { $baseUrl->redirect(); } } - public function content(): string + protected function content(array $request = []): string { - $apps = Nav::getAppMenu(); - + $apps = $this->nav->getAppMenu(); if (count($apps) == 0) { - notice($this->l10n->t('No installed applications.')); + $this->systemMessages->addNotice($this->t('No installed applications.')); } $tpl = Renderer::getMarkupTemplate('apps.tpl'); return Renderer::replaceMacros($tpl, [ - '$title' => $this->l10n->t('Applications'), + '$title' => $this->t('Applications'), '$apps' => $apps, ]); }