diff options
author | friendica <info@friendica.com> | 2012-03-14 21:20:20 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-03-14 21:20:20 -0700 |
commit | 110e8f29197e0824d555b82c05c31f36b87ab7ae (patch) | |
tree | 2c6c691aae709d41d1b198537d9679ec18290b4f /include/nav.php | |
parent | f0a62d8908cef31982c1c2b24fc9dbc8b59b8bdb (diff) | |
download | volse-hubzilla-110e8f29197e0824d555b82c05c31f36b87ab7ae.tar.gz volse-hubzilla-110e8f29197e0824d555b82c05c31f36b87ab7ae.tar.bz2 volse-hubzilla-110e8f29197e0824d555b82c05c31f36b87ab7ae.zip |
basic ssl_policy for important modules
Diffstat (limited to 'include/nav.php')
-rwxr-xr-x | include/nav.php | 8 |
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')); |