X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fapps.php;h=b8800c7d7082a726c9d19de444820229c971cbe5;hb=0b5f7da270bcaa679cb684dbbbbe40781f0b49c6;hp=f25722df785ac6942353c74579ba5fc14a967cce;hpb=7ffd0ee41a70d30cadf18032f655222911304b7c;p=friendica.git diff --git a/mod/apps.php b/mod/apps.php index f25722df78..b8800c7d70 100644 --- a/mod/apps.php +++ b/mod/apps.php @@ -1,25 +1,26 @@ ' . t('Applications') . ''; - - $apps = false; - - if(local_user()) { - $apps = true; - $o .= '
' . t('Private Notes') . '
'; +use Friendica\App; +use Friendica\Core\Config; + +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; + }; } - if($a->apps) { - $apps = true; - $o .= $a->apps; - } - - if(! $apps) - notice( t('No installed applications.') . EOL); + $title = t('Applications'); - return $o; + if (count($a->apps) == 0) { + notice(t('No installed applications.') . EOL); + } -} \ No newline at end of file + $tpl = get_markup_template('apps.tpl'); + return replace_macros($tpl, array( + '$title' => $title, + '$apps' => $a->apps, + )); +}