]> git.mxchange.org Git - friendica.git/blob - mod/apps.php
Issue-#3873
[friendica.git] / mod / apps.php
1 <?php
2
3 use Friendica\App;
4 use Friendica\Core\Config;
5
6 function apps_content(App $a) {
7         $privateaddons = Config::get('config', 'private_addons');
8         if ($privateaddons === "1") {
9                 if (! local_user()) {
10                         info(t('You must be logged in to use addons. '));
11                         return;
12                 };
13         }
14
15         $title = t('Applications');
16
17         if (count($a->apps) == 0) {
18                 notice(t('No installed applications.') . EOL);
19         }
20
21         $tpl = get_markup_template('apps.tpl');
22         return replace_macros($tpl, array(
23                 '$title' => $title,
24                 '$apps' => $a->apps,
25         ));
26 }