X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fapps.php;h=d497ce93a2812c6695dbc160bd491c8734562c65;hb=0dc06d66a0f4bc68529fe693b919d0a72ea57a28;hp=f25722df785ac6942353c74579ba5fc14a967cce;hpb=dea721a3f866956e0d0b86316679e05498b1d81c;p=friendica.git diff --git a/mod/apps.php b/mod/apps.php index f25722df78..d497ce93a2 100644 --- a/mod/apps.php +++ b/mod/apps.php @@ -1,25 +1,33 @@ ' . t('Applications') . ''; - - $apps = false; - - if(local_user()) { - $apps = true; - $o .= '
' . t('Private Notes') . '
'; +/** + * @file mod/apps.php + */ +use Friendica\Content\Nav; +use Friendica\Core\Config; +use Friendica\Core\L10n; +use Friendica\Core\Renderer; + +function apps_content() +{ + $privateaddons = Config::get('config', 'private_addons'); + if ($privateaddons === "1") { + if (! local_user()) { + info(L10n::t('You must be logged in to use addons. ')); + return; + }; } - if($a->apps) { - $apps = true; - $o .= $a->apps; - } + $title = L10n::t('Applications'); - if(! $apps) - notice( t('No installed applications.') . EOL); + $apps = Nav::getAppMenu(); - return $o; + if (count($apps) == 0) { + notice(L10n::t('No installed applications.') . EOL); + } -} \ No newline at end of file + $tpl = Renderer::getMarkupTemplate('apps.tpl'); + return Renderer::replaceMacros($tpl, [ + '$title' => $title, + '$apps' => $apps, + ]); +}