1
0
Fork 0

Merge pull request #5990 from MrPetovan/task/move-apps-out-of-app

Road to Router Part 4: Move $apps out of App
This commit is contained in:
Michael Vogel 2018-10-22 22:47:22 +02:00 committed by GitHub
commit c0abff0bda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 98 additions and 83 deletions

View file

@ -2,11 +2,11 @@
/**
* @file mod/apps.php
*/
use Friendica\App;
use Friendica\Content\Nav;
use Friendica\Core\Config;
use Friendica\Core\L10n;
function apps_content(App $a)
function apps_content()
{
$privateaddons = Config::get('config', 'private_addons');
if ($privateaddons === "1") {
@ -18,13 +18,15 @@ function apps_content(App $a)
$title = L10n::t('Applications');
if (count($a->apps) == 0) {
$apps = Nav::getAppMenu();
if (count($apps) == 0) {
notice(L10n::t('No installed applications.') . EOL);
}
$tpl = get_markup_template('apps.tpl');
return replace_macros($tpl, [
'$title' => $title,
'$apps' => $a->apps,
'$apps' => $apps,
]);
}