aboutsummaryrefslogtreecommitdiffstats
path: root/include/nav.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-03-15 10:18:06 +0100
committerzottel <github@zottel.net>2012-03-15 10:18:06 +0100
commit69f4448adaf7afddf00deeb2f832938d5505abcf (patch)
treec849dae276511aa93ba1ef8b2b90098116d65f3e /include/nav.php
parent282465edaba57795b8c02d1fb6eaa8a2fbbad9bf (diff)
parenta7fd3a8b245a09f376081f23f5d23d907d21ecfa (diff)
downloadvolse-hubzilla-69f4448adaf7afddf00deeb2f832938d5505abcf.tar.gz
volse-hubzilla-69f4448adaf7afddf00deeb2f832938d5505abcf.tar.bz2
volse-hubzilla-69f4448adaf7afddf00deeb2f832938d5505abcf.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/nav.php')
-rwxr-xr-xinclude/nav.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/nav.php b/include/nav.php
index aadfa82fd..e28081839 100755
--- a/include/nav.php
+++ b/include/nav.php
@@ -8,6 +8,8 @@ function nav(&$a) {
*
*/
+ $ssl_state = ((local_user()) ? true : false);
+
if(!(x($a->page,'nav')))
$a->page['nav'] = '';
@@ -27,7 +29,7 @@ function nav(&$a) {
$myident = ((is_array($a->user) && isset($a->user['nickname'])) ? $a->user['nickname'] . '@' : '');
- $sitelocation = $myident . substr($a->get_baseurl(),strpos($a->get_baseurl(),'//') + 2 );
+ $sitelocation = $myident . substr($a->get_baseurl($ssl_state),strpos($a->get_baseurl($ssl_state),'//') + 2 );
// nav links: array of array('href', 'text', 'extra css classes', 'title')
@@ -53,7 +55,7 @@ function nav(&$a) {
// user info
$r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid']));
$userinfo = array(
- 'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl()."/images/default-profile-mm.jpg"),
+ 'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl($ssl_state)."/images/default-profile-mm.jpg"),
'name' => $a->user['username'],
);
@@ -76,7 +78,7 @@ function nav(&$a) {
if(($a->config['register_policy'] == REGISTER_OPEN) && (! local_user()) && (! remote_user()))
$nav['register'] = array('register',t('Register'), "", t('Create an account'));
- $help_url = $a->get_baseurl() . '/help';
+ $help_url = $a->get_baseurl($ssl_state) . '/help';
if(! get_config('system','hide_help'))
$nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'));