X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fapps.php;h=b8800c7d7082a726c9d19de444820229c971cbe5;hb=de56a3a824ec9aa0e54dd0903c995076fdb9ae43;hp=e807feae74e537c76110e33ccdf5f0ceb66bba63;hpb=db949bb802448184bfe5164d8d3dd86ddf51b187;p=friendica.git diff --git a/mod/apps.php b/mod/apps.php index e807feae74..b8800c7d70 100644 --- a/mod/apps.php +++ b/mod/apps.php @@ -1,23 +1,26 @@ apps)==0) - notice( t('No installed applications.') . EOL); +function apps_content(App $a) { + $privateaddons = Config::get('config', 'private_addons'); + if ($privateaddons === "1") { + if (! local_user()) { + info(t('You must be logged in to use addons. ')); + return; + }; + } - $tpl = get_markup_template("apps.tpl"); - return replace_macros($tpl, array( - '$title' => $title, - '$apps' => $a->apps, - )); -} + $title = t('Applications'); + + if (count($a->apps) == 0) { + notice(t('No installed applications.') . EOL); + } + + $tpl = get_markup_template('apps.tpl'); + return replace_macros($tpl, array( + '$title' => $title, + '$apps' => $a->apps, + )); }