diff options
author | redmatrix <git@macgirvin.com> | 2016-07-03 15:58:20 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-07-03 15:58:20 -0700 |
commit | 57226b2e1378c2769709a2b2407249cc4e3b14f4 (patch) | |
tree | fbb6a4713b6ae9c5cb13ab47ffdb1d03a586c820 /include/nav.php | |
parent | 17e161006a9ddbfbea3e0b6d5f7776ad7b8101e2 (diff) | |
parent | f46eecc1e7585e64069bb18918a2db057a16c480 (diff) | |
download | volse-hubzilla-57226b2e1378c2769709a2b2407249cc4e3b14f4.tar.gz volse-hubzilla-57226b2e1378c2769709a2b2407249cc4e3b14f4.tar.bz2 volse-hubzilla-57226b2e1378c2769709a2b2407249cc4e3b14f4.zip |
Merge branch 'dev' into perms
Diffstat (limited to 'include/nav.php')
-rw-r--r-- | include/nav.php | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/nav.php b/include/nav.php index 70faec598..1fb0e98dc 100644 --- a/include/nav.php +++ b/include/nav.php @@ -104,6 +104,8 @@ EOT; if(feature_enabled($channel['channel_id'],'webpages') && (! UNO)) $nav['usermenu'][] = Array('webpages/' . $channel['channel_address'],t('Webpages'),"",t('Your webpages'),'webpages_nav_btn'); + if(feature_enabled($channel['channel_id'],'wiki') && (! UNO)) + $nav['usermenu'][] = Array('wiki/' . $channel['channel_address'],t('Wiki'),"",t('Your wiki'),'wiki_nav_btn'); } else { if(! get_account_id()) { @@ -126,7 +128,7 @@ EOT; $nav['lock'] = array('logout','','lock', sprintf( t('%s - click to logout'), $observer['xchan_addr'])); } - else { + elseif(! $_SESSION['authenticated']) { $nav['loginmenu'][] = Array('rmagic',t('Remote authentication'),'',t('Click to authenticate to your home hub'),'rmagic_nav_btn'); } @@ -143,7 +145,7 @@ EOT; if((App::$module != 'home') && (! (local_channel()))) $nav['home'] = array($homelink, t('Home'), "", t('Home Page'),'home_nav_btn'); - if((App::$config['system']['register_policy'] == REGISTER_OPEN) && (! local_channel()) && (! remote_channel())) + if((App::$config['system']['register_policy'] == REGISTER_OPEN) && (! $_SESSION['authenticated'])) $nav['register'] = array('register',t('Register'), "", t('Create an account'),'register_nav_btn'); if(! get_config('system','hide_help')) { @@ -253,6 +255,19 @@ $powered_by = ''; '$pleasewait' => t('Please wait...') )); + + if(x($_SESSION, 'reload_avatar') && $observer) { + // The avatar has been changed on the server but the browser doesn't know that, + // force the browser to reload the image from the server instead of its cache. + $tpl = get_markup_template('force_image_reload.tpl'); + + App::$page['nav'] .= replace_macros($tpl, array( + '$imgUrl' => $observer['xchan_photo_m'] + )); + unset($_SESSION['reload_avatar']); + } + + call_hooks('page_header', App::$page['nav']); } |