From e71cdf02a8303689c933b98185e2671f49fc5a7d Mon Sep 17 00:00:00 2001 From: git-marijus Date: Wed, 26 Jul 2017 21:42:07 +0200 Subject: move the active app code to include/nav.php - it is only relevant there --- Zotlabs/Lib/Apps.php | 3 --- include/nav.php | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 08f054eaf..68587df49 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -284,9 +284,6 @@ class Apps { if(! $papp['photo']) $papp['photo'] = z_root() . '/' . get_default_profile_photo(80); - if(\App::$nav_sel['active'] == $papp['name']) - $papp['active'] = true; - self::translate_system_apps($papp); if(trim($papp['plugin']) && (! plugin_is_installed(trim($papp['plugin'])))) diff --git a/include/nav.php b/include/nav.php index 4cb2e7fa6..cd32126a1 100644 --- a/include/nav.php +++ b/include/nav.php @@ -242,6 +242,9 @@ EOT; $syslist = Zlib\Apps::app_order(local_channel(),$syslist); foreach($syslist as $app) { + if(\App::$nav_sel['active'] == $app['name']) + $app['active'] = true; + if($is_owner) $nav_apps[] = Zlib\Apps::app_render($app,'nav'); elseif(! $is_owner && strpos($app['requires'], 'local_channel') === false) -- cgit v1.2.3