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