]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Apps.php
Merge pull request #12025 from annando/no-boot-src-module
[friendica.git] / src / Module / Apps.php
index f414f7f8cb2525f241d307e8453c4a951191fb13..36a980c29d2c737650ecec6abe24a1a46459487c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
 
 namespace Friendica\Module;
 
+use Friendica\App;
 use Friendica\App\BaseURL;
 use Friendica\BaseModule;
 use Friendica\Content\Nav;
 use Friendica\Core\Config\Capability\IManageConfigValues;
 use Friendica\Core\L10n;
 use Friendica\Core\Renderer;
+use Friendica\Core\Session;
+use Friendica\DI;
+use Friendica\Util\Profiler;
+use Psr\Log\LoggerInterface;
 
 /**
  * Shows the App menu
  */
 class Apps extends BaseModule
 {
-       public function __construct(L10n $l10n, IManageConfigValues $config, BaseURL $baseUrl, array $parameters = [])
+       public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = [])
        {
-               parent::__construct($l10n, $parameters);
+               parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
 
                $privateaddons = $config->get('config', 'private_addons');
-               if ($privateaddons === "1" && !local_user()) {
+               if ($privateaddons === "1" && !Session::getLocalUser()) {
                        $baseUrl->redirect();
                }
        }
 
-       public function content(): string
+       protected function content(array $request = []): string
        {
                $apps = Nav::getAppMenu();
 
                if (count($apps) == 0) {
-                       notice($this->t('No installed applications.'));
+                       DI::sysmsg()->addNotice($this->t('No installed applications.'));
                }
 
                $tpl = Renderer::getMarkupTemplate('apps.tpl');