]> 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 6b8d18b94244385d2c3dbccf26a4461d07527412..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
  *
@@ -28,6 +28,8 @@ 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;
 
@@ -41,7 +43,7 @@ class Apps extends BaseModule
                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();
                }
        }
@@ -51,7 +53,7 @@ class Apps extends BaseModule
                $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');