]> git.mxchange.org Git - friendica.git/blob - src/Module/Apps.php
Revert logic change in query in NotificationsManager->setSeen
[friendica.git] / src / Module / Apps.php
1 <?php
2
3 namespace Friendica\Module;
4
5 use Friendica\BaseModule;
6 use Friendica\Content\Nav;
7 use Friendica\Core\Config;
8 use Friendica\Core\L10n;
9 use Friendica\Core\Renderer;
10
11 /**
12  * Shows the App menu
13  */
14 class Apps extends BaseModule
15 {
16         public static function init()
17         {
18                 $privateaddons = Config::get('config', 'private_addons');
19                 if ($privateaddons === "1" && !local_user()) {
20                         self::getApp()->internalRedirect();
21                 }
22         }
23
24         public static function content()
25         {
26                 $apps = Nav::getAppMenu();
27
28                 if (count($apps) == 0) {
29                         notice(L10n::t('No installed applications.') . EOL);
30                 }
31
32                 $tpl = Renderer::getMarkupTemplate('apps.tpl');
33                 return Renderer::replaceMacros($tpl, [
34                         '$title' => L10n::t('Applications'),
35                         '$apps'  => $apps,
36                 ]);
37         }
38 }