diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/nav.php | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/include/nav.php b/include/nav.php index 6b56c9aee..28ca54d07 100644 --- a/include/nav.php +++ b/include/nav.php @@ -103,12 +103,12 @@ EOT; $nav['logout'] = ['logout',t('Logout'), "", t('End this session'),'logout_nav_btn']; // user menu - $nav['usermenu'][] = ['profile/' . $channel['channel_address'], t('View Profile'), ((\App::$nav_sel['active'] == 'Profile') ? 'active' : ''), t('Your profile page'),'profile_nav_btn']; + $nav['usermenu'][] = ['profile/' . $channel['channel_address'], t('View Profile'), ((\App::$nav_sel['name'] == 'Profile') ? 'active' : ''), t('Your profile page'),'profile_nav_btn']; if(feature_enabled(local_channel(),'multi_profiles')) - $nav['usermenu'][] = ['profiles', t('Edit Profiles'), ((\App::$nav_sel['active'] == 'Profiles') ? 'active' : '') , t('Manage/Edit profiles'),'profiles_nav_btn']; + $nav['usermenu'][] = ['profiles', t('Edit Profiles'), ((\App::$nav_sel['name'] == 'Profiles') ? 'active' : '') , t('Manage/Edit profiles'),'profiles_nav_btn']; else - $nav['usermenu'][] = ['profiles/' . $prof[0]['id'], t('Edit Profile'), ((\App::$nav_sel['active'] == 'Profiles') ? 'active' : ''), t('Edit your profile'),'profiles_nav_btn']; + $nav['usermenu'][] = ['profiles/' . $prof[0]['id'], t('Edit Profile'), ((\App::$nav_sel['name'] == 'Profiles') ? 'active' : ''), t('Edit your profile'),'profiles_nav_btn']; } else { @@ -258,7 +258,7 @@ EOT; $syslist = Zlib\Apps::app_order(local_channel(),$syslist); foreach($syslist as $app) { - if(\App::$nav_sel['active'] == $app['name']) + if(\App::$nav_sel['name'] == $app['name']) $app['active'] = true; if($is_owner) @@ -291,7 +291,8 @@ EOT; '$addapps' => t('Add Apps'), '$orderapps' => t('Arrange Apps'), '$sysapps_toggle' => t('Toggle System Apps'), - '$loc' => $myident + '$loc' => $myident, + '$url' => ((App::$nav_sel['url']) ? App::$nav_sel['url'] : App::$cmd) )); if(x($_SESSION, 'reload_avatar') && $observer) { @@ -314,7 +315,13 @@ EOT; * */ function nav_set_selected($item){ - App::$nav_sel['active'] = $item; + if(is_array($item)) { + App::$nav_sel['name'] = $item['name']; + App::$nav_sel['url'] = $item['url']; + } + else { + App::$nav_sel['name'] = $item; + } } |