diff options
author | Mario <mario@mariovavti.com> | 2023-11-25 17:12:28 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-11-25 17:12:28 +0100 |
commit | 0fd8e02a884a2b040dca62ab5d9674db5f6a070b (patch) | |
tree | 586ee43f32f6f14368c09026f21dcd3244ea24b6 /include/nav.php | |
parent | 82e704ec5b107823c09f1387e9091adee53a4c2d (diff) | |
parent | 55c4bfb67009c598f25b1a8189604bfffa73dfbb (diff) | |
download | volse-hubzilla-8.8.tar.gz volse-hubzilla-8.8.tar.bz2 volse-hubzilla-8.8.zip |
Merge branch '8.8RC'8.8
Diffstat (limited to 'include/nav.php')
-rw-r--r-- | include/nav.php | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/include/nav.php b/include/nav.php index 31a447a84..e4df7e4e5 100644 --- a/include/nav.php +++ b/include/nav.php @@ -21,7 +21,7 @@ function nav($template = 'default') { $is_owner = (((local_channel()) && ((App::$profile_uid == local_channel()) || (App::$profile_uid == 0))) ? true : false); $observer = App::get_observer(); $chans = []; - + $channel = []; if (local_channel()) { $channel = App::get_channel(); @@ -84,11 +84,23 @@ function nav($template = 'default') { $userinfo = []; if ($observer) { - $userinfo = [ - 'icon' => $observer['xchan_photo_m'] . '?rev=' . strtotime($observer['xchan_photo_date']), - 'addr' => $observer['xchan_addr'], - 'name' => $observer['xchan_name'], - ]; + $userinfo['icon'] = $observer['xchan_photo_s'] . '?rev=' . strtotime($observer['xchan_photo_date']); + $userinfo['icon_m'] = $observer['xchan_photo_m'] . '?rev=' . strtotime($observer['xchan_photo_date']); + $userinfo['icon_l'] = $observer['xchan_photo_l'] . '?rev=' . strtotime($observer['xchan_photo_date']); + $userinfo['icon_mime_type'] = $observer['xchan_photo_mimetype']; + $userinfo['addr'] = $observer['xchan_addr']; + $userinfo['url'] = $observer['xchan_url']; + $userinfo['forum'] = $observer['xchan_pubforum']; + $userinfo['name'] = $observer['xchan_name']; + } + + if ($channel) { + $userinfo['id'] = $channel['channel_id']; + $userinfo['nick'] = $channel['channel_address']; + $userinfo['location'] = $channel['channel_location']; + $userinfo['theme'] = $channel['channel_theme']; + $userinfo['timezone'] = $channel['channel_timezone']; + $userinfo['startpage'] = $channel['channel_startpage']; } elseif (empty($_SESSION['authenticated'])) { @@ -201,7 +213,10 @@ function nav($template = 'default') { $nav['admin'] = ['admin/', t('Admin'), "", t('Site Setup and Configuration'), 'admin_nav_btn']; } - $theme_switch_icon = ((App::$page['color_mode'] === 'dark') ? 'sun' : 'moon'); + $theme_switch_icon = ''; + if (isset(App::$page['color_mode'])) { + $theme_switch_icon = ((App::$page['color_mode'] === 'dark') ? 'sun' : 'moon'); + } $x = ['nav' => $nav, 'usermenu' => $userinfo]; |